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:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 12:58 PM
To: [EMAIL PROTECTED]
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


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to