WHILE IF/ELSE loop not working

From: Date: Fri, 24 Jan 2003 21:11:44 +0000
Subject: WHILE IF/ELSE loop not working
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-133048@lists.php.net to get a copy of this message
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 &nbsp;<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 &nbsp;<B>$date</B>. "; else: echo "<B>Sorry! $_POST[areacode]-$_POST[prefix]-$_POST[suffix]</B> is not available at this time."; endif; endif; endwhile; ==================================================

« previous php.general (#133048) next »