HTML Get POST forms
| From: | Varsha Agarwal | Date: | Tue, 09 Jul 2002 03:06:27 +0000 |
| Subject: | HTML Get POST forms | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-106208@lists.php.net to get a copy of this message | ||
Hi,
I want to create a simple form and reteive the data
and print it. I have done the following in Foo.php.
<form action="foo.php" method="post">
*Name: <input type="text" name="username"><br>
*Email : <input type="text" name="email"><br>
<input type="submit" name="submit" value="Submit
me!">
</form>
Note: * fields are necessary.
<?php
print $_POST[ 'username' ];
print $_REQUEST[ 'username' ];
import_request_variables( 'p', 'p_' );
print $p_username;
?>
The browser gives me error that undefined index
'usename'. Can anyone tell me what could be wrong as i
am very new to HTML and PHP.
-Varsha
__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com