How to print data from table?
Why does the following code only prints only one entry:
$result = mysqli_query($con,"SELECT * FROM verifications WHERE
user='seriot'");
$row = mysqli_fetch_array($result);
echo date(DATE_RFC822);
echo "<br>";
echo "<br>";
echo "<b>".$row['firstname'] . " " . $row['lastname']."</b>";
echo "<br>";
while($row = mysqli_fetch_array($result)){
echo $row['filepath']." ".$row['type'];
echo "<br>";
}
While this code will print all entries:
while($row = mysqli_fetch_array($result)){
echo $row['filepath']." ".$row['type'];
echo "<br>";
}
I am trying to print the First Name and Last Name once and then all
filepath and type entries until the next name.
Thank you, Kevin
No comments:
Post a Comment