note 24071 rejected from faq by jimw

From: Date: Tue, 06 Aug 2002 15:25:46 +0000
Subject: note 24071 rejected from faq by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-34402@lists.php.net to get a copy of this message
After upgrading to PHP 4.2.2 from 4.1.2, I am now unable to use the "If ()" statement in a form like I once did. I am using something similar to this: <?php if ($submit) { echo $YesNo; } else { ?> <form method="post" action="test.php"> Do you want to say "Yes" or "No"? <input type="text" name="YesNo"><br> <input type="Submit" name="submit" value="Enter"> </form> <?php } ?> All I am wanting to do, is if the button named "submit" has been clicked, the page reloads itself with the message in the variable "YesNo" being displayed rather than the form. Once I click submit, it always reloads the page with the form instead of the message. Does anyone know of why this might be occuring?

« previous php.notes (#34402) next »