Hi,
I have 7 records in my database, im running PHP code to connect to my database and display ALL from the database/table but its only displaying 4 out of the 7 records. How come?
<?php
$username="REMOVED";
$password="REMOVED";
$database="REMOVED";
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Oops theres an error, our highly trained monkeys have been notified.");
$query="SELECT * FROM leads";
$result=mysql_query($query);
$num=mysql_numrows($result) or die(mysql_error());
?>
<table width="100%" border="1">
<tr>
<th><em><strong>ID</strong></em></th>
<th><em><strong>Name</strong></em></th>
<th><em><strong>Email</strong></em></th>
<th><em><strong>Telephone</strong></em></th>
<th><em><strong>Venue</strong></em></th>
<th><em><strong>When</strong></em></th>
<th><em><strong>Date</strong></em></th>
<th><em><strong>Time</strong></em></th>
<th><em><strong>IP</strong></em></th>
</tr>
<?php
$i=0;
while ($i < $num) {
$id=mysql_result($result,$i,"ID");
$first=mysql_result($result,$i,"Name");
$email=mysql_result($result,$i,"Email");
$telephone=mysql_result($result,$i,"Telephone");
$venue=mysql_result($result,$i,"Venue");
$call=mysql_result($result,$i,"When");
$dateentered=mysql_result($result,$i,"Date");
$timeentered=mysql_result($result,$i,"Time");
$ip=mysql_result($result,$i,"IP");
?>
<tr>
<td><? echo $id; ?></td>
<td><? echo $first; ?></td>
<td><? echo $email; ?></td>
<td><? echo $telephone; ?></td>
<td><? echo $venue; ?></td>
<td><? echo $call; ?></td>
<td><? echo $dateentered; ?></td>
<td><? echo $timeentered; ?></td>
<td><? echo $ip; ?></td>
</tr>
<?
$i++;
$i++;
}
mysql_close();
?>
</table>
Any help would be great.
Thanks