RE: [PHP] Problem about Reading input from a Form
| From: | John Day | Date: | Mon, 25 Feb 2002 13:00:35 +0000 |
| Subject: | RE: [PHP] Problem about Reading input from a Form | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-86078@lists.php.net to get a copy of this message | ||
You need to add the POST method to your form tag ....
<form action="listing9.3.php" method="post">
Cheers
JD
-----Original Message-----
From: Kostas Karadamoglou [mailto:kknt2000@hotmail.com]
Sent: Monday, February 25, 2002 12:58 PM
To: php-general@lists.php.net
Subject: [PHP] Problem about Reading input from a Form
I can't take the variables $user and $address from the form to the php
file.
Below I have the code.When I test the examble I only see the html text
but
not the variables. Thank you
THE HTML FORM
<html>
<head>
<title>Listing 9.2 </title>
</head>
<body>
<form action="listing9.3.php">
<input type="text" name="user">
<br>
<textarea name="address" rows="5" cols="40">
</textarea>
<br>
<input type="submit" value="hit it!">
</form>
</body>
</html>
THE PROCCESS OF THE INPUT FORM
<html>
<head>
<title>Listing 9.3 </title>
</head>
<body>
<?php
print "Welcome <b>$user</b><P>\n\n";
print "Your address is:<P>\n\n<b>$address</b>";
?>
</body>
</html>
The files are in the same directory
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php