Hiya,
I'm going a little nuts here.
I'm using this code below to generate a list of names & email addresses.
The sql query is fine.
It returns the correct number of results
But when i try and echo the name and email addresses in a while loop, it doesn't work.
Can anyone point out the (I assume) blindingly obvious reason why this isn't working please? I've been on this for 3 hours now!
$mailinglist = mysql_query('SELECT * FROM mailinglist') or die(mysql_error());
if (mysql_num_rows($mailinglist) > 0)
{
echo 'names and emails'; //this displays OK
echo '<br>'.mysql_num_rows($mailinglist); //this displays the correct number of results
while ($mail = mysql_fetch_array($mailinglist));
{
echo $mail['name'].' '.$mail['email'].'<br>';
}
}// endif num_rows