Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    May 2006
    Posts
    29
    Thanks
    10
    Thanked 0 Times in 0 Posts

    I losing All Cookie when go to next page

    I'm using those function for Set And Get Cookie :

    Code:
    XXX

    I set the cookie at inex.php and go to next page using that code :
    Code:
    window.location = 'index.php?p=2';
    I lose all the cookie when I be in the next page !!

    what's the wrong on my code ?
    Last edited by Dooq; 10-18-2008 at 03:13 AM.

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,147
    Thanks
    203
    Thanked 2,547 Times in 2,525 Posts
    I don't see anything wrong with your code. Are you sure that you are calling the functions setCookie() and getCookie() correctly? The path must be set:-var path = '/';

  • Users who have thanked Philip M for this post:

    Dooq (10-18-2008)


  •  

    Posting Permissions

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