Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying more than one record

Status
Not open for further replies.

ameslee

Programmer
Feb 12, 2006
34
0
0
AU
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!
 
hi, wrong forum

try the PHP forum:
forum434

Known is handfull, Unknown is worldfull
 
no probs

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top