#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    2
    Rep Power
    0
    While using setcookies in my "new user login" program, i'm facing a problem.
    My cookie is storing the login name in the same page but as i go to another page and insert information about that user, who has just logged in, then it doesn't take the login in the sql query.
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15

    You will have to set the directory for your cookie.other wise it won't availabe through out your site

    eg:

    setcookie("cookiename","cookie value",time()+14400,"/","www.yourdomain.com");

    make sure that you are using last two arguments.so it will recognize your cookie through out your site...

    i hope this will solve your problem..

    Good Luck!!




    ------------------
    SR -
    webshiju.com

    "The fear of the LORD is the beginning of knowledge..."
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    45
    Rep Power
    15
    The parameter "/" provides the directory that you want the cookie to act on. Setting it to "/" will make the cookie accessable anywhere on the site. Setting "www.yourdomain.com" tells the cookie under what domain the "/" is to be applied to. Get?

Similar Threads

  1. Can user A read user B's session?
    By Stupid Khor in forum PHP Development
    Replies: 9
    Last Post: May 11th, 2004, 05:19 AM
  2. embed browser into java program?
    By tmike in forum Java Help
    Replies: 1
    Last Post: February 16th, 2004, 10:01 AM
  3. Replies: 1
    Last Post: January 27th, 2004, 02:02 PM
  4. Replies: 1
    Last Post: January 27th, 2004, 01:13 PM
  5. php user levels
    By dynasty in forum PHP Development
    Replies: 1
    Last Post: January 20th, 2004, 02:01 PM

IMN logo majestic logo threadwatch logo seochat tools logo