> Try to make a small new script that only contains a form and a session.
> Then try a from with the same field names as the variable names.
> name='test' => $_SESSION['test'].
> When the session data is overwritten by the second try, registerglobals is
> switchd on.
> The thing you can do then is to rename your form fields. I use:
> name='in[YourFieldName]'
> This outputs an array:
> $_POST =>
>       in =>
>               YourFieldName = 'bar'
> Adriaan

Ayy. If registerglobals should be on, try to turn it off. It just supports
laziness and promotes confusion. But that's just my very subjective opinion.

Checking for registerglobals is a good idea, though, and grouping form
fields into an array is one as well, as long as you stay in php with your

Also, try fiddling with your cookie settings, if a lower setting solves the
problem, you have to add the session-id to the action in the form tag, i.e.
<form method="post" action="somewhere.php?

Ah, and, don't know if you knew or not: You can see what's left of your
session, your post and generally any array with print_r or vardump, i.e.
print_r($_SESSION); print_r($_POST). As other people said, you probably
either forgot to session_start() somewhere, or the post screws up the
transparent session id thingy, or registerglobals is on.


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

Reply via email to