Hi I could do with some advice.
I am trying to pass a variable from one script to another. But cannot seem to get it to work. The code is below:
- The first script sets the ordeid value to 1
$HTTP_SESSION_VARS['orderid'] = '1';
if (isset($HTTP_SESSION_VARS['orderid']))
{
$order = $HTTP_SESSION_VARS['orderid'];
$db = mysql_connect ('xxxxxxxxxx', 'xxxxxxxxxxxxx', 'xxxxxxxxx');
mysql_select_db ('xxxxxxx');
$query = "Select product, price from productsordered where orderid = ".$order."";
$result = mysql_query ( $query ,$db);
- On the second page (or Script) I am trying to check if the variable orderid from the previous script is set. I have tested the first page and it sets the variable for that page allowing it to work fine. But when i move over to this script it never retrives the value?
if (isset($HTTP_SESSION_VARS['orderid']))
{
$order = $HTTP_SESSION_VARS['orderid'];
*************more code. I didint think it was needed
Am I Coding it right can someone point me in the right direction.
Thanks All
🆒