note 74837 added to tutorial.forms
| From: | danrulz98 at yahoo dot com | Date: | Mon, 30 Apr 2007 15:24:59 +0000 |
| Subject: | note 74837 added to tutorial.forms | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-125980@lists.php.net to get a copy of this message | ||
In the sample above, the code dose not work. Even if you copy and paste the sample code you will
get:
Hi . You are 0 years old
The code should look more like this on the main page:
<?php echo '<p>Hello World</p>'; ?>
<form action="action.php" methhod="get">
<p>Your name: <input type="text" name="name" /></p>
<p>your age: <input type="text" name="age" /></p>
<p><input type="submit" /></p>
Then the action page should look like this:
Hi <?php echo htmlspecialchars($_GET['name']); ?>.
You are <?php echo (int)$_GET['age']; ?> years old
----
Server IP: 69.147.83.197
Probable Submitter: 198.236.13.36 (proxied: 198.236.44.110)
----
Manual Page -- http://www.php.net/manual/en/tutorial.forms.php
Edit -- https://master.php.net/note/edit/74837
Del: integrated -- https://master.php.net/note/delete/74837/integrated
Del: useless -- https://master.php.net/note/delete/74837/useless
Del: bad code -- https://master.php.net/note/delete/74837/bad+code
Del: spam -- https://master.php.net/note/delete/74837/spam
Del: non-english -- https://master.php.net/note/delete/74837/non-english
Del: in docs -- https://master.php.net/note/delete/74837/in+docs
Del: other reasons-- https://master.php.net/note/delete/74837
Reject -- https://master.php.net/note/reject/74837
Search -- https://master.php.net/manage/user-notes.php