I’ve a table invitation with coloumns toemail, fromemail, send
I need to print toemail & fromemail from all rows having valid send=1
This is the code that I’m using
<?php
$query = mysql_query("SELECT fromemail,toemail FROM invitations WHERE sent = 1");
if(mysql_num_rows($query)!=0)
{
$row = mysql_fetch_assoc($query);
echo $row['toemail'];
echo $row['fromemail];
}
?>
But this prints only the first row which satisfying the condition.
Help me to get the php code please.
Thanks in advance.
Use this,