Re: Variable problems
| From: | Thomas Smart | Date: | Sun, 09 Mar 2003 20:07:46 +0000 |
| Subject: | Re: Variable problems | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-18924@lists.php.net to get a copy of this message | ||
in the page that recieves the variable add this:
$test = $_POST['test'];
"Reggie P" <reggie@fpcomputing.com> wrote in message
news:20030309183416.74715.qmail@pb1.pair.com...
> I am new to php and I am having problems passing variables from one page
to
> another. I wrote a simple script as such:
>
> <html>
> <head>
> <body>
> <Form Action="./cgi-bin/insert2.php" METHOD=post>
> name <input type="text" name="test" size=20>
> <input type=submit name="submit" value="submit!">
> </form>
> </body>
> </html>
>
> then pass to this page:
>
> <html>
> <head>
> </head>
> <body>
>
> <?
> print ("$test\n");
>
> ?>
> </body>
> </html>
>
> I get this for the response:
>
> Notice: Undefined variable: test in E:\websites\girls\cgi-bin\insert2.php
on
> line 8
>
> Please help!!
>
>
>
>