Fires of Heaven Guild Message Board  

Go Back   Fires of Heaven Guild Message Board > General forums > Development
User Name
Password
ForumSpy Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 12-28-2007, 08:36 AM   #1 (permalink)
Sabolin
Registered User
 
Join Date: May 2003
Posts: 264
+5 Internets
PHP + Cookies Help!

I'm starting to teach myself some PHP/cookies/mysql fun stuff and I'm having some trouble.

I have this site that requires the user to log in using mod_rewrite. When the PHP login script runs, I added a part where it sets a cookie containing the username, then it starts a session and redirects the browser to the main page after login. On this main page, I'm trying to retrieve this cookie containing the username and output it, but I can't seem to retrieve it. The cookie exists, I can see it in the temporary internet files folder and it does contain the login username. When I checked isset() on the cookie, it failed. When I change my script to print_r($_COOKIE) I see a few other cookies but the cookie I set during login doesn't show up in there (but it's still visible in the TIF folder).

Any ideas? Google searches aren't turning up any answers to this problem.

Thanks.

edit-
btw my output code to view the cookie is simply:
echo $_COOKIE['cookiename'];

Last edited by Sabolin : 12-28-2007 at 08:40 AM.
Sabolin is offline   Reply With Quote
Old 12-28-2007, 09:08 AM   #2 (permalink)
Sabolin
Registered User
 
Join Date: May 2003
Posts: 264
+5 Internets
Nevermind, the login script itself sets some cookies w/ the optional path and domain parameters so I copied those from one of those cookies and added it to mine and now it is working correctly.
Sabolin is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On
uberguilds network



All times are GMT -7. The time now is 01:46 AM.


Powered by vBulletin® Version 3.6.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0 RC6