Jump to content

session issues: not showing


RobLamb

Recommended Posts

Hi Everyone

I am having a problem with some session variables. Basically I am setting them based on fields in a form, then I need to use them for an update query in another page. If I view all the variables set, I can see them, but they are not coming through in my code where I need them.

 

Print out of page where I am checking them. (The two i need are frPrefixTwo and frNoTwo) Please help urgent;y on this guys!! I am really stuck.

ses1:

ses2:

SELECT stockId FROM tblstock WHERE stockEnginePrefix = '' AND stockFrameNo = ''

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\clubYamaha2\step5mark.php:36) in C:\xampp\htdocs\clubYamaha2\step5mark.php on line 45

Array ( [KT_lastsiteroot] => 93bf5b3b77be8647f2b4b5e7332e7273 [frPrefix] => 3gx [frNo] => 110194 [title] => Mr [firstName] => a [surname] => b [TelHome] => [TelWork] => [TelCell] => [iDNo] => 730710524869 [frPrefixTwo] => 3gx [frNoTwo] => 110194 [yamType] => 3 [yamUse] => 17 [yamReg] => [yamPurch] => 1 [stockId] => )

 

<code>

$colname_rsStockId = $_SESSION['frPrefixTwo'];

$col2_rsStockId = $_SESSION['frNoTwo'];

echo "ses1: ".$_SESSION['frPrefixTwo']."<br/>";

echo "ses2: ".$col2_rsStockId."<br/>";

mysql_select_db($database_conYamaha, $conYamaha);

$query_rsStockId = sprintf("SELECT stockId FROM tblstock WHERE stockEnginePrefix = '".$colname_rsStockId."' AND stockFrameNo = '".$col2_rsStockId."'");

echo $query_rsStockId;

$rsStockId = mysql_query($query_rsStockId, $conYamaha) or die(mysql_error());

$row_rsStockId = mysql_fetch_assoc($rsStockId);

$totalRows_rsStockId = mysql_num_rows($rsStockId);

 

session_start();

$_SESSION['stockId'] = $row_rsStockId['stockId'];

 

session_start();

Print_r ($_SESSION);

</code>

 

Link to comment
https://forums.phpfreaks.com/topic/183946-session-issues-not-showing/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.