Method of Get/Post
| From: | Mohsen Pahlevanzadeh | Date: | Fri, 04 Apr 2003 22:30:58 +0000 |
| Subject: | Method of Get/Post | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-14901@lists.php.net to get a copy of this message | ||
Hi dears.I wrote following code:
<html>
<head>
</head>
<body>
<form method="get">
<input type="text" name="p" size="30"> <br>
<input type="text" name="u" size="30"> <br>
<?PHP
$u=urlencode($u);$p=urlencode($p);
print "<a href=\"join.php?p=$p&u=$u\">join</a>";
?>
</body>
</html>
But when i click over join,My browser redirect to http://localhost/join.php?p=&u=
This URL means value of my form not sent.
But when i write following code,all right send :
<html>
<head>
</head>
<body>
<form action="foo.php" method="GET">
Name: <input type="text" name="p"><br>
Email: <input type="text" name="u"><br>
<input type="submit" name="submit" >
</form>
</body>
</html>
Please guide me until when i want to use <a> tag,i can choose to put a variable instead of
value.
I'm waitting your answer...
--Best regards
_____________________________________________________________
Thank you for choosing LinuxQuestions.
http://www.linuxquestions.org
_____________________________________________________________
Select your own custom email address for FREE! Get you@yourchoice.com w/No Ads, 6MB, POP & more!
http://www.everyone.net/selectmail?campaign=tag