SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2002
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Sessions and header (location : ...)

    I'm working with sessions and a header (location: message.php?w=x&to=x) for logging in the site. On the next message.php page, it says "you have logged in etc", it creates a cookie and redirects you to the front page (with a <meta http-equiv="Refresh"> tag) or at least that is what is supposed to happen... When I log in, it goes to the message.php page and just keeps loading it. When I press "stop" I get a blank page (When I view source I do get the html code) which redirects with no session vars saved.
    I read somewhere that you should add ".sid" to the header but that didn't help.

    The code looks like this:
    session_start();
    $HTTP_SESSION_VARS['ss_username'] = $record['username'];
    header ("Location: message.php?w=1&to=1");

    I have no idea what the problem is but it sure is annoying... Any ideas?

  2. #2
    SitePoint Wizard silver trophy redemption's Avatar
    Join Date
    Sep 2001
    Location
    Singapore
    Posts
    5,269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the ".sid" should be SID... but i think that's not the issue anyway...

    maybe you didn't add a session_start() in message.php??

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2002
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yup, session_start() is in all files, as it is in an include.

    Is it possible that this is a server issue?


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
  •