I have checked that the session is started session_start()
Register Globals is on
Other session variables are displayed when I echo them so they are working fine.
$results_id is not empty.
Please help
Code: Select all
//registering the session var $result_id
mysql_select_db($database_db_connect, $db_connect);
$query_results = "SELECT id FROM quiz_scores ORDER BY id DESC";
$results = mysql_query($query_results, $db_connect) or die(mysql_error());
$row_results = mysql_fetch_assoc($results);
$totalRows_results = mysql_num_rows($results);
$results_id = $row_results['id'];
session_register("results_id");Code: Select all
$score_id = $_SESSION['results_id'];
echo $score_id;