Passing variables

From: Date: Mon, 08 Jul 2002 12:40:46 +0000
Subject: Passing variables
Groups: php.general 
Request: Send a blank email to php-general+get-106080@lists.php.net to get a copy of this message
Dear Justin, After reading Kevin Yank's "Managing Users ..." at www.sitepoint.com, I tried the following 2 scripts. Unfortunately, the variable $course is NOT being passed to the 2nd script. Thus, per the script, the Home page is displayed. Why? --- 1st script --- <?php // file: "root/reg_users_2.php", updated: 07/08/02 set_time_limit(300); session_start(); session_register("course"); $course="stats_101"; header ("location:estadisticas/contents.php"); flush(); exit; ?> --- 2nd script --- <?php // file: "root/estadisticas/contents.php", updated: 07/06/02 set_time_limit(300); if ($course!="stats_101") { header("location:../index.htm"); // Home page flush(); exit; } else { echo " <html> --- HTML code here --- </html> "; }; flush(); exit; ?> Thanks! Tony

« previous php.general (#106080) next »