# START CODE SNIPPET ... COMMENTS BELOW (and yes I am not a db guru by
anymeans, might be easier ways to do this)

<?php
  session_start();
  $tsid=session_id();
  echo $tsig; # <--------debug
  $date=date("ymdHi");
  $connect=mysql_pconnect('localhost', 'user', 'pass');
  mysql_select_db('db', $connect);
  $queryexe=mysql_query("SELECT user, ip, dtg FROM tmp WHERE sid='$tsid'");
  $row=mysql_fetch_array($queryexe);
  extract($row);
  $id='';
  $status='';
  mysql_select_db('a_db', $connect);
  $queryexe=mysql_query("SELECT site, camp FROM users WHERE user='$user'");
  $row=mysql_fetch_array($queryexe);
  extract($row);
  mysql_select_db('cbs_tech', $connect);
  extract($_GET);
  extract($_POST);
  switch ($site){
    case 'cbs':
      switch ($_SERVER['REQUEST_METHOD']){
        case 'POST':
          switch ($user){
            case 'allenr':
              break;
            default:
              switch ($status){
                case 1:
                  $queryexe=mysql_query("SELECT event FROM log WHERE
id=$id");
                  $row=mysql_fetch_array($queryexe);
                  extract($row);
                  $queryexe=mysql_query("UPDATE log SET event='$event' WHERE
id=$id");
                  header('Location: https://example.org');
                  die;
              }
              break;

Now this is where I have issues.  The header ('Location:
https://example.org') works as it is suppose to BUT!!! a new SID is issued.
Thought the SID stayed w/ the browser until it was closed.  When I loop back
through I of course can not find the previous SID as a new one was created.
Is it because I am going POST-->GET (seems to work with GET-->GET or
GET-->POST)

Any ideas why a new one is being created? (and don't say start_session() ...
this  is a long script and the ONLY place it has issues is when I am
processing a $POST (works fine for all the $GETS))

Thank in advance,

-Peter


##################################
Peter Thoenen - Systems Programmer
Commercial Communications
Camp Bondsteel, Kosovo
##################################

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to