This statement returns only one row even if there are 5 rows in the table. What am I ding wrong. Please help. Thanks to all in advance
If($num_rows ==0)
{echo "<BR> No Guest were found. Please Add the Guest.";}
else{
#CREATE THE TABLE WITH RESULTS
echo "<TABLE ALIGN=\"CENTER\" BORDER=\"8\">";
echo "<TR><TH>Last Name</TH>
<TH>First Name</TH>
<TH>Address</TH>
<TH>City</TH>
<TH>State</TH>
<TH>Zip</TH>
<TH>Country</TH>
<TH>Phone</TH>
<TH>Choose 1</TH></TR>";
$mysql_result=mysql_query($sql,$link2);
while($row1=mysql_fetch_array($mysql_result))
{ $last_name=$row1["guest_last_name"];
$first_name =$row1["guest_first_name"];
$guest_no=$row1["guest_no"];
$guest_address_1=$row1["guest_address_1"];
$guest_city=$row1["guest_city"];
$guest_state=$row1["guest_state_province"];
$guest_zip=$row1["guest_zip"];
$guest_country=$row1["guest_country"];
$guest_phone_no=$row1["guest_phone_no"];
}
echo "<TR><TD>$last_name</TD>
<TD>$first_name</TD>
#<TD>$guest_address_1</TD>
#<TD>$guest_city</TD>
#<TD>$guest_state</TD>
#<TD>$guest_zip</TD>
#<TD>$guest_country</TD>
#<TD>$guest_phone_no</TD>
#<TD><INPUT TYPE=\"SUBMIT\" VALUE =\"Select\">";
}
}
mysql_close($link2);