Page 1 of 1

passing cookie variables

Posted: Fri Apr 19, 2002 5:59 pm
by abionifade
Hi guys,

I have created a authentication script which then extracts the user id entered by the user and then stores it in a cookie variable called $mycookie.

Further on into the site I am able to use the cookie to perform various select statements. Only problem is that php files that i have 'required' do not recieve or even recognise the $mycookie variable.

example: require("add.php");

So my select statements which end WHERE user_id='mycookie' simply do not function.

Please forgive me if im overlooking something very small, please point me in the right direction.

Many thanks.

-Abi

Posted: Fri Apr 19, 2002 8:26 pm
by sam
Try loading the cookie variable into a new variable at the start of your script and work with this variable.

Cheers Sam :)

Posted: Fri Apr 19, 2002 8:27 pm
by sam
Try loading the cookie variable into a new variable at the start of your script and work with this variable.

Cheers Sam :)

Posted: Fri Apr 19, 2002 9:29 pm
by abionifade
'brilliant' worked a treat.

Thank you once again :lol:

Posted: Fri Apr 19, 2002 11:33 pm
by sam
Your welcome.

Cheers Sam