Re: WHILE IF/ELSE loop not working

From: Date: Fri, 24 Jan 2003 21:43:01 +0000
Subject: Re: WHILE IF/ELSE loop not working
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-133052@lists.php.net to get a copy of this message
Define "fails" ----- Original Message ----- From: "Jay Fitzgerald" <jayfitz@bayou.com> To: <php-general@lists.php.net> 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 &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; ================================================== -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#133052) next »