Re: Notice: Undefined variable:
| From: | Hornig at NOSPAM artshock2d dot de | Date: | Fri, 25 Oct 2002 06:50:47 +0000 |
| Subject: | Re: Notice: Undefined variable: | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-16544@lists.php.net to get a copy of this message | ||
"Richard West" <ice_dog76@hotmail.com> schrieb im Newsbeitrag
news:20021025015917.6473.qmail@pb1.pair.com...
> Hey, I just installed apache and php on my desktop and everything was
> working great. I went to go make a form and I am getting these errors
> everytime I try to access one of the variables in the form
>
> Notice: Undefined variable: guest_name in C:\www\book_add.php on line 18
>
> anyone got an idea why its doing it. this is what my form looks like.
> <form method=get action="book_add.php">
> Your Name: <input name="guest_name" type="text"><br>
> Your e-mail: <input name="address" type="text"><br>
> Your comments:<br> <TextArea name="comments" cols="50"
> rows="5">
> </textarea>
> <br>
> <br>
> <input type=submit>
> </form>
> and my out put it this
> <?php $guest_name; ?>
> any ideas why I can't access my query variables??
>
> Richard West
> ice_dog76@hotmail.com
>
>
ahm, which version of php you're using?
from version 4.2.3 the get and post requests changed because of a security
problem. now you have to access the post and get variables with
$HTTP_GET_VARS[] or
the short $_GET[] or for post variables $HTTP_POST_VARS[] or the same in
short $_POST[].
i think that would be the problem...
an other advice could be: go into your php.ini and set "register_globals"
on. ... but it isn't recommend...
i hope i could help you!? :)