dear friends,
I am developing Online registration form... I want to display data record vice not row vice...my code is below

<?php
include "conn1.php";

$sql = "SELECT * FROM reg";
$result = $conn->query($sql);

if ($result->num_rows > 0) {
     echo "<table style='border: solid 1px black;'>";
     echo "<tr><th>Id</th><th>Firstname</th><th>Lastname</th><th>Email</th><th>Reg date</th></tr>";
     // output data of each row
     while($row = $result->fetch_assoc()) {
        // echo "<tr><td>" . $row["pn"]. "</td><td>" .$row["sp"]. "</td></tr>";
     }
     echo "</table>";
} else {
     echo "0 results";
}

  $conn->close();
?>

please suggest me.

I don't understand what you mean. What is data record vice and row vice?
What data from the table do you want to display on the screen?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.