RE: [PHP] [Q]PHP not taking input values from forms
| From: | Ford, Mike [LSS] | Date: | Thu, 12 Feb 2004 10:17:13 +0000 |
| Subject: | RE: [PHP] [Q]PHP not taking input values from forms | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-177489@lists.php.net to get a copy of this message | ||
On 11 February 2004 18:01, Dan Aloma wrote:
> Sorry about not including code the first time. Here is a
> snippet of code I
> am fairly certain should be doing something. Thank you SOOO
> much for the
> help. I've been working on setting up php for four days now
> and EVERYTHING
> else works (phpinfo() calls, etc), but for some reason forms,
> even ones that
> I know should be working don't take values. They just return
> you to the same
> screen.
>
> CODE:
> <html>
> <body>
>
> <br><br>
> <?=$errormessage?>
> <br>
>
> <form action="<?=$_SERVER['PHP_SELF']?>"
> method="post">
> <table width="500" border="0" cellpadding="5"
> cellspacing="0"> <tr>
> <td>Your name:</td>
> <td><input type="text"
> name="name"value="<?=$_POST['name']?>"></td>
> </tr> <tr>
> <td>Your email:</td>
> <td><input type="text" name="email"
> value="<?=$_POST['email']?>"><td>
> <tr> <tr>
> <td>Your message:</td>
> <td><textarea
>
> name="message"><?=$_POST['message']?></textarea></td></tr>
> </table>
> <input type="hidden" name="required"
> value="name,email,message">
> <input type="submit" name="submit" value="submit">
>
> </body></html>
H'mmm -- one other thought in addition to all the other good pointers: is short_open_tag On or
Off? Because if it's off, none of those <?= snippets will fire anyway.
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@leedsmet.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211