Posted by Geoff Berrow on 09/28/46 11:43
Message-ID: <1143524859.916294.266550@z34g2000cwc.googlegroups.com> from
Duderino82 contained the following:
>first the esxpression in the if is wrong.
>
>if (isset($submit) && $submit=="yes")
>
>could be a typo ...anyway you might want to considere the fact that
>only the second condition is necessary(if the 2° is true will allways
>be true even the 1°)
If you have full error reporting on (which you should), doing that will
generate an undefined variable notice.
Actually, the main problem is in the form tag. :-)
It should read:
<?php
error_reporting(E_ALL);
if (isset($_POST['submit']) &&$_POST['submit']=="yes") {
echo "thank you very much.";
} else {
?>
<form action='<?php echo $_SERVER['PHP_SELF']; ?>' method='POST'>
<input type='text' name='email'>
<input type='text' name='first_name'>
<input type='submit' name='submit' value='yes'>
</form>
<?php
}
?>
--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011
Navigation:
[Reply to this message]
|