Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cookie problem...

Status
Not open for further replies.

youradds

Programmer
Jun 27, 2001
817
GB
Can anyone see why this isn't working? Its just bringing up dead values :( I'm setting it with the following stuff;

setcookie ("Ace_Affiliate_Username", $Username);
setcookie ("Ace_Affiliate_Password", $Password);

Then in another script (same directory), I'm calling it with $Ace_Affiliate_Username, etc. But the values are just blank. The same kind of thing has worked in other script....but not this one :/

Cheers

Andy
 
You may not have register_globals turned on in php.ini.

If you are using PHP 4.1.0 or higher, try using $_COOKIE["Ace_Affiliate_Username"], etc.

If you are using PHP earlier than 4.1.0, try $HTTP_COOKIE_VARS["Ace_Affiliate_Username"] ______________________________________________________________________
My God! It's full of stars!
______________________________________________________________________
 
No...I'm pretty sure its enabled, as my other scripts work fine with it as it is. As for the $_COOKIE["Ace_Affiliate_Username"] thing..that came up blank too :(

Any more ideas? It normally works without specifying an expiration time...as it then just deletes itself when the browser is closed :-/

Thanks

Andy
 
I already had problems with cookies before, but i solved them using the domain and the path.

Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top