i have a checkout.php file that "uses" (not at the moment) session variables
the code similar to this:
//config.inc file
<?
session_register("userid_loggedin");
session_start();
?>
//checkout.php contains two forms and 3 actions (2 forms + an insert queries) for the data that was submitted on the last form
include "config.inc";
if ($username!="") {
select from user where username=$HTTP_POST_VARS["username"];
...
if (mysql_num_rows($result) == 1) {
$HTTP_SESSION_VARS["userid_loggedin"]=$user_id
...
}
}
then in does register $HTTP_SESSION_VARS["userid_loggedin"] and gives it a value of lets say "1", but this variable exists only on this page and if user submits the form, the $HTTP_SESSION_VARS["userid_loggedin"] variable is not getting passed, its just dieing for some reason . i have a form after user is logged in, that he need to fill out and submit, but as soon as he submits it variable does not exist....
am i missing some cookies part or conf settings ? i use WIN2000server + iis + php (last version just downloaded from the website)
on more thing :
second example :
/// 1.php file as follows
<?
session_register("cart");
session_register("item");
$HTTP_SESSION_VARS["cart"]="my cart";
$HTTP_SESSION_VARS["item"]="my item";
?>
/// 2.php file follows
<?
session_start();
echo $HTTP_SESSION_VARS["item"];
echo $HTTP_SESSION_VARS["cart"];
?>
i run 1.php first
then 2.php
works perfect if i disable register_globals, as soon as i enable it 2.php output is an empty screen ?
i would very appreciate any, just any help