SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    Non-Member bigrollerdave's Avatar
    Join Date
    Mar 2005
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    A little help with cookies

    Ok my website stores a cookie just fine but when someone goes to the site it apperas there logged out untill they click on the home page link then it apperas there logged in again. OR if they click on a link to my site it appears offline again im not sure what it is i have the cookie info in the header so its not like the homepage even matters but you have to click the home page link for it to log you in is there any way i can make it so right when you go to the site your logged in?

  2. #2
    Non-Member bigrollerdave's Avatar
    Join Date
    Mar 2005
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    if($autologin=='1')
    {
    session_register('username');
    session_register('usrid');
    session_register('Sess_UserId');
    session_register('usrname');

    thats the code i have in my header

  3. #3
    Non-Member bigrollerdave's Avatar
    Join Date
    Mar 2005
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nevermind i think i got it what i did was make it store a cookie no matter what on login and i removed the if($autologin=='1') statement

  4. #4
    Non-Member bigrollerdave's Avatar
    Join Date
    Mar 2005
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmm that only seems to work with IE not firefox anyone have any ideas?

  5. #5
    Non-Member bigrollerdave's Avatar
    Join Date
    Mar 2005
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    anyone?

  6. #6
    SitePoint Guru
    Join Date
    Nov 2004
    Location
    Plano
    Posts
    643
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    IE and firefox would be a client-side issue. check your HTML and js.

    or make sure you're clearing your cache and that you're settings aren't causing your script to break.

    a server-side script works the same in any browser, so if it works in any browser, then server-side scripts are not the problem.

  7. #7
    Non-Member bigrollerdave's Avatar
    Join Date
    Mar 2005
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    so i should make it clear the cache on every page?

  8. #8
    Non-Member bigrollerdave's Avatar
    Join Date
    Mar 2005
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this is the cache i have in the header

    <META http-equiv="Cache-Control" content="no-cache", must-revalidate>
    <meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META http-equiv="Expires" content="Mon, 01 Jan 1990 00:00:00 GMT">


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •