note 75094 added to tutorial.forms

From: Date: Sat, 12 May 2007 02:11:57 +0000
Subject: note 75094 added to tutorial.forms
Groups: php.notes 
Request: Send a blank email to php-notes+get-126421@lists.php.net to get a copy of this message
<html> <head> <title>New Page 1</title> </head> <body> <form action="hello.php" method="post"> <p>Your name: <input type="text" name="name" /></p> <p>Your age: <input type="text" name="age" /></p> <p><input type="submit" /></p> </form> Hi <?php echo htmlspecialchars($_POST['name']); ?>. You are <?php echo (int)$_POST['age']; ?> years old. </body> </html> _______________ Note the form action points to a filename.php If that file is not on your machine... example "action.php" (wasn't on mine) and the file name you are using is different .. such as hello.php (which was name I was using to test the code) then you will get an error message. Make the form action point to the page filename you are actually using and everything checks out ok. A BlueStocking observation. BTW: Thank you... very much appreciated. ---- Server IP: 69.147.83.197 Probable Submitter: 75.24.187.57 ---- Manual Page -- http://www.php.net/manual/en/tutorial.forms.php Edit -- https://master.php.net/note/edit/75094 Del: integrated -- https://master.php.net/note/delete/75094/integrated Del: useless -- https://master.php.net/note/delete/75094/useless Del: bad code -- https://master.php.net/note/delete/75094/bad+code Del: spam -- https://master.php.net/note/delete/75094/spam Del: non-english -- https://master.php.net/note/delete/75094/non-english Del: in docs -- https://master.php.net/note/delete/75094/in+docs Del: other reasons-- https://master.php.net/note/delete/75094 Reject -- https://master.php.net/note/reject/75094 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#126421) next »