On Thu, Sep 16, 2010 at 10:26 AM, Cheryl Sullivan <csull...@shh.org> wrote: > Absolutely - > > This is from the first page > > <?php > > $_SESSION['UserLastName'] = strtolower(trim($_POST['txtLastName'])); > > $_SESSION['BadgeID'] = trim($_POST['txtBadgeID']); > > //access MS SQL Server database > > $q1 = "select * from emps where emp_last = > '".$_SESSION['UserLastName']."' and emp_badge = > '".$_SESSION['BadgeID']."'"; > > $rs_emp_info = hitMSSQL($q1,"xxxx_sql","database","table","password",1); > > $_SESSION['SSN'] = $rs_emp_info->fields("emp_ssn"); > > $_SESSION['CostCenter'] = $rs_emp_info->fields("emp_costcenter"); > > //access mySQL database > > $cnx = mysql_connect("localhost","userID","password"); > > $db = mysql_select_db("database_name"); > > $q1 = "select * from tblmainempreport where empUUID = > 'sdfsfs920090528131'"; > > $result = mysql_query($q1); > > $recArray = mysql_fetch_array($result); > > $_SESSION['empFName'] = $recArray['EmpFName']; > > ?> > > > > When I echo all five $_SESSION vars from here, they are all populated. > Then I can either redirect or form post to the next page. In either > case, the $_SESSION vars populated from SQL Server ( the SSN and Cost > Center vars) are blank when I echo them on the destination page.
The fact that you can echo the $_SESSION information on the same page and they contain the correct values suggest to me that the issue of MySQL/MSSQL is a red herring. I would look into things like the value for register_globals to make sure you don't have a global variable stepping on some of your session variables. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php