PHP Code:
while($result = mysql_fetch_array($event_query));
This is a loop with no body, it fetches every row out of the result set and does nothing with it. Then you display the last row it fetched in your HTML below.
Modified:
PHP Code:
<?php
$dbh = mysql_connect("localhost","username","passwork") or die(mysql_error());
mysql_select_db("database");
$eventid = (int)$_GET['eventid'];
$event_sql = "SELECT * FROM table WHERE eventid=$eventid LIMIT 0, 30";
$result = mysql_query($event_sql) or die(mysql_error());
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<table width="800" border="1" cellspacing="0" cellpadding="0">
<?php while ($rsEvent = mysql_fetch_array($result)) { ?>
<tr>
<td width="133"><?php echo $rsEvent['id']; ?> </td>
<td width="133"><?php echo $rsEvent['name']; ?></td>
<td width="133"><?php echo $rsEvent['email']; ?></td>
<td width="133"><?php echo $rsEvent['phone']; ?></td>
<td width="133"><?php echo $rsEvent['notes']; ?></td>
</tr>
<?php } ?>
</table>
</body>
</html>
Bookmarks