From: Richard Davey <[EMAIL PROTECTED]> Reply-To: Richard Davey <[EMAIL PROTECTED]> To: "Dan Aloma" <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED] Subject: Re[2]: [PHP] [Q]PHP not taking input values from forms Date: Wed, 11 Feb 2004 18:20:11 +0000
Hello Dan,
Wednesday, February 11, 2004, 6:01:21 PM, you wrote:
DA> Sorry about not including code the first time. Here is a snippet of code I
DA> am fairly certain should be doing something. Thank you SOOO much for the
Your code is (mostly) fine. The only part that didn't work is the final "the form has been submitted" section because it comes after the HTML page end. Move it to the start. Also, you don't have a closing form tag.
The following is your code, changed slightly.. try it and see but it works perfectly here (PHP 4.3.2, Apache, Windows). I added the echo time() line so you can see if the page reloads or not:
<html> <body>
<?php if ($_POST['submit']) { echo "The form has been submitted<br>"; echo time(); } ?>
<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"> </form>
</body> </html>
-- Best regards, Richard mailto:[EMAIL PROTECTED]
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
_________________________________________________________________
Click here for a FREE online computer virus scan from McAfee. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php