Hi All
I need some advice with a session problem I am having.
Putting it briefly I create a variable called $orderid in my main shopping cart page, I then stored it in a session id. The page that it is created on is ---www.globallifeline.com/testindex.php.
I then try to obatin it in my secure checkout page ---https://sslrelay.com/globallifeline.com/Pages/CustomerServices/cart.php.
The problem is it cannot find the variable or the session in the checkout page. However if i change the link to the checkout page from the secure link (above) to ---www.globallifeline.com/Pages/CustomerServices/cart.php. it works without a problem.
Any Ideas
I have Set the code out below:
This is the part of the php in the first page, this sets the $orderid variable. Don't worry about the session_start () iit s at the top of my main page, thats why it isn't displayed below
<?php
$HTTP_SESSION_VARS['orderid'] = '1';
if (isset($HTTP_SESSION_VARS['orderid']))
{
$order = $HTTP_SESSION_VARS['orderid'];
$db = mysql_connect (, , );
mysql_select_db ();
$query = "Select product, price from productsordered where orderid = ".$order."";
$result = mysql_query ( $query ,$db);
while ($myrow = mysql_fetch_array($result))
{
echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
echo "<tr>";
echo "<td width=\"33%\"><p class=\"Text1\"><u>Product Name</u></p></td>";
echo "</tr>";
echo "<tr>";
echo "<td><p class=\"Text1\"><strong>".$myrow["product"]."</strong></p></td>";
echo "</tr>";
echo "<tr>";
echo "<td> <p class=\"Text1\"><u>Product Price</u></p></td>";
echo "</tr>";
echo "<tr>";
echo "<td><p class=\"Text1\"><strong>£ ".$myrow["price"]."</strong></p></td>";
echo "</tr>";
echo "</table>";
}}
if (!isset($HTTP_SESSION_VARS['orderid']))
{
echo "Cart Is Empty";
}
?>
This is the code to the secure page, Once again the session_start at the top of page
if (isset($HTTP_SESSION_VARS['orderid']))
{
$order = $HTTP_SESSION_VARS['orderid'];
$db = mysql_connect ('','' , '');
mysql_select_db (');
$query = "Select product, price, rewardpoints, productnumber from productsordered where orderid = ".$order."";
$result = mysql_query ( $query ,$db);
$totalrewardpoints = 0;
$totalprice = 0;
Code Below Just Eccos Html
Any Help Would Be Great
OLY