note 24071 added to faq
| From: | ChrisMathison at Cox dot net | Date: | Mon, 05 Aug 2002 23:14:41 +0000 |
| Subject: | note 24071 added to faq | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-34345@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?
--
http://www.php.net/manual/en/faq.php
http://master.php.net/manage/user-notes.php?action=edit+24071
http://master.php.net/manage/user-notes.php?action=delete+24071
http://master.php.net/manage/user-notes.php?action=reject+24071