Question
I need help with my php code. This is my code, this is my output, but i dont want it to be horizontal like this
I need help with my php code. This is my code,
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "student";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
//create and execute query
$sql = "SELECT * FROM studentdata";
$result = $conn->query($sql);
//check if records were returned
if ($result->num_rows > 0) {
//create a table to display the record
echo '
Name | IdentificationCard | Gender | Religion | Nation | Phone Number | Search | Delete | |
'.$row["Name"].' | ';'.$row["IdentificationCard"].' | ';'.$row["StudentEmail"].' | ';'.$row["StudentGender"].' | ';'.$row["StudentReligion"].' | ';'.$row["StudentNation"].' | ';'.$row["StudentMobile"].' | ';
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started