Jump to content

setcookie() and "logins"


conker87

Recommended Posts

I'm making a little community site, mainly for my friends and relative and to learn more about PHP.

The login and logout code works perfect, but because of the setcookie() limit you have to refresh to actually see that you've login/out.

Is there anyway around this? I'd like to be able to see the login area straight away.

Thanks
- Pope SMII
Link to comment
https://forums.phpfreaks.com/topic/31917-setcookie-and-logins/
Share on other sites

Still not working all that great.

I've moved all of the processing to process.php but you still have to refresh the main page before the "login" is acknowledged.

Anyone else have any ideas?

Edit:
Let me elaborate a little more.

You click on the login link, which takes you to: /?action=login, you enter your details into the form, submit it and the action heads to /?action=process (which processes several other results too - including registration and confirmation). When you click the link to head to the homepage you still have to refresh to actually get the logged in details, such as a new Navigation bar and the "Hello <Username>".
Link to comment
https://forums.phpfreaks.com/topic/31917-setcookie-and-logins/#findComment-148256
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.