Announcement

Collapse
No announcement yet.

Session works, just a little too well

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Session works, just a little too well

    Right I got this session script to tell me where i've been and to show different pictures. The problem is, if one session is registered, they all change...

    HEADER FILE:
    PHP Code:
    $s=mysql_query("SELECT * FROM session");
    $usersess=mysql_result($s,'','sessid');
    session_id($usersess);
    session_start(); 
    INDEX FILE:
    PHP Code:
    include("header.php");

    ...WHILE FUNCTION 
    IS HERE TO SHOW ALL PLACES...
    $placy=$place[placeid];
    if(
    session_is_registered('placesess[$placy]')){
    echo 
    "<td bgcolor=$atbbk><img src=images/old.gif></td>";
    }else{
    echo 
    "<td bgcolor=$atbbk><img src=images/new.gif></td>";

    PLACE FILE(S):
    PHP Code:
    include("header.php");
    session_register('placesess[$placeid]');
    mysql_query("UPDATE session SET sessid=('$PHPSESSID')"); 
    Last edited by Steviepowers; Sun 23 Dec '01, 7:31pm.
Loading...
Working...
X