Re: Damn Cookie
| From: | Tom Carter | Date: | Fri, 26 Jan 2001 23:03:28 +0000 |
| Subject: | Re: Damn Cookie | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-6216@lists.php.net to get a copy of this message | ||
what is probably happening is that your file, page.html is setting the
variable user_name to a value at some point in the script. The URL you
gave effectively is the same as making the first two lines of the file
read
$user_name='name';
$password='password';
Hence if a subsquent line in the script then sents $user_name to a
different value then this will replace 'name'. TGhis would happen, for
example if you read from a cookie to find out the name.
One simple way around this is...
if(!$user_name)
{
//code to execute if $user_name hasn't alread got a value
}
On Thu, 25 Jan 2001, John Starkey wrote:
> I'm not sure if this is my problem but it's wigging me out.
>
> I've got a login page posting only the user_name and password vars. No
> matter what it's using the same name over again.
>
> http://......./page.html?user_name=name&password=password
>
> When i open page.html and do echo $user_name it still doesn't echo the
> name above. Nothing is happening before the echo.
>
> I just checked with mac and it logged in the first time showing the user
> that I entered and is in the url. But when I went back and logged in under
> a diff name it retained the original name.
>
> Anyone know what's going on?
>
> Thanks,
>
> John
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>