RE: [PHP] When an if does not work

From: Date: Sat, 23 Dec 2000 00:51:05 +0000
Subject: RE: [PHP] When an if does not work
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-31644@lists.php.net to get a copy of this message
Hi, I am new to the list myself. Unless I missed something the code is fine. I ran it through my server and it functions correctly. Is it possible you are initializing $toolow someplace else? Try adding $toolow = 0; to the top of your code and see how that works. Gerard -----Original Message----- From: lance@dallypost.com [mailto:lance@dallypost.com] Sent: Friday, December 22, 2000 4:12 PM To: php-general@lists.php.net Subject: [PHP] When an if does not work HERE IS A VERY SIMPLE CODE FRAGMENT THAT DOES NOT WORK ---------------------------------------------------------------------------- ------------ //Begin Test if($testmode == 1){print("<BR><font color=red size=+2>TEST::t_minbid = $t_minbid</font>");} //End Test //Begin Test if($testmode == 1) { print("<BR><font color=red size=+2>TEST::aucbid = $aucbid</font>"); } //End Test if ($aucbid < $t_minbid) { //Begin Test if($testmode == 1) { print("<BR><font color=red size=+2>TEST:: or here</font>"); } //End Test $toolow = 1; } if ($toolow) { echo "<h3>Bid too low.</h3>"; echo "<p>Sorry, that bid is too low. Bids must meet or exceed the "; echo "listed minimum bid. Please try again. "; exit; } ---------------------------------------------------------------------------- --- AND THIS IS THE RESULT TEST::t_minbid = 110 TEST::aucbid = 110 TEST:: or here Bid too low. Sorry, that bid is too low. Bids must meet or exceed the listed minimum bid. Please try again. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#31644) next »