Re: Trying to pass a variable through a form...
| From: | Alex Shi | Date: | Fri, 07 Dec 2001 04:07:56 +0000 |
| Subject: | Re: Trying to pass a variable through a form... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-76978@lists.php.net to get a copy of this message | ||
Can you paste Tnoy2.php script? Please make sure in Tony2.php $name
is printed but not $lname.
Alex
----- Original Message -----
From: "Anthony Ritter" <tony@gonefishingguideservice.com>
To: <php-general@lists.php.net>
Sent: Friday, December 07, 2001 12:01 AM
Subject: [PHP] Trying to pass a variable through a form...
> I'm trying to pass a variable from a form text box into a php file
> (Tony1.php).
>
> Then, I'd like to click on a link in the Tony1.php page and get the
> Tony2.php page to load with the original variable -$lname - printed on the
> next page (Tony2.php).
>
> The Tony2.php loads when I click the link but the value from the variable
is
> not printed.
>
> Any help would be greatly appreciated.
> The code is below.
> Tony Ritter
> ...................................
>
>
> file://TonyForm.html//
>
> <HTML>
> <FORM ACTION="Tony1.php" METHOD="get">
> Name: <INPUT TYPE="text" NAME="lname"> <br>
> <INPUT TYPE="Submit" VALUE="Go">
> </FORM>
> </HTML>
>
> .....................
> file://Tony1.php//
>
> <?
> echo ("Welcome $lname");
> ?>
> <A HREF="Tony2.php?name=<?echo($lname) ?>"> Link </A>
>
>
> ...................
> file://Tony2.php//
>
> Hello
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>