hey can anyone help me with displaying more than one record? here is my code.
<html>
<head>
<title>Display all Users</title>
</head>
<body>
<h3>User Details</h3>
<?php
//database connection
include("database.inc");
$query = "Select * From `login`";
$mysql_result=mysql_query($query,$conn);
$row=mysql_fetch_row($mysql_result);
?>
<center>
<table width=100% border=1>
<tr>
<td><b>Username</b></td>
<td><b>Password</b></td>
<td><b>Level</b></td>
<td><b>Edit</b></td>
<td><b>Delete</b></td>
<?php
while ($row[0]!=""){
echo "<tr><td>$row[1]</td><td>$row[2]</td><td>$row[3]</td>";
echo "<td><a href='edit_user2.php?id=$row[0]'>Edit</a></td>";
echo "<td><a href='delete_checkuser2.php?id=$row[0]'>Delete</a></td></tr>";
$row=mysql_fetch_row($mysql_result);
}
?>
</table>
<p>
<a href="index.php">Main Menu</a>
</center>
</body>
</html>
at the moment it is displaying all the records but in between the 2nd and 3rd record there is a space.
can someone help me? thanks!
<html>
<head>
<title>Display all Users</title>
</head>
<body>
<h3>User Details</h3>
<?php
//database connection
include("database.inc");
$query = "Select * From `login`";
$mysql_result=mysql_query($query,$conn);
$row=mysql_fetch_row($mysql_result);
?>
<center>
<table width=100% border=1>
<tr>
<td><b>Username</b></td>
<td><b>Password</b></td>
<td><b>Level</b></td>
<td><b>Edit</b></td>
<td><b>Delete</b></td>
<?php
while ($row[0]!=""){
echo "<tr><td>$row[1]</td><td>$row[2]</td><td>$row[3]</td>";
echo "<td><a href='edit_user2.php?id=$row[0]'>Edit</a></td>";
echo "<td><a href='delete_checkuser2.php?id=$row[0]'>Delete</a></td></tr>";
$row=mysql_fetch_row($mysql_result);
}
?>
</table>
<p>
<a href="index.php">Main Menu</a>
</center>
</body>
</html>
at the moment it is displaying all the records but in between the 2nd and 3rd record there is a space.
can someone help me? thanks!