Define "fails" ----- Original Message ----- From: "Jay Fitzgerald" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 24, 2003 3:11 PM Subject: [PHP] WHILE IF/ELSE loop not working
can anyone tell me why this while loop fails? ================================================== while ($row = mysql_fetch_array($sql_result)): $phone = $row["phone"]; $date = $row["date"]; if ($phone == "$_POST[areacode]$_POST[prefix]$_POST[suffix]"): if ($date == NULL): $date = "today"; echo "<B><I>Congratulations!</B></I> <P> <B>$_POST[areacode]-$_POST[prefix]-$_POST[suffix]</B> is qualified with an available date of <B>$date</B>. "; elseif ($date != NULL): echo "<B><I>Congratulations!</I></B> <P> <B>$_POST[areacode]-$_POST[prefix]-$_POST[suffix]</B> is qualified with a first available date of <B>$date</B>. "; else: echo "<B>Sorry! $_POST[areacode]-$_POST[prefix]-$_POST[suffix]</B> is not available at this time."; endif; endif; endwhile; ================================================== -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php