Re: Help w/ sessionl variables plz!
| From: | Richard Lynch | Date: | Sat, 06 Jul 2002 22:04:27 +0000 |
| Subject: | Re: Help w/ sessionl variables plz! | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-105892@lists.php.net to get a copy of this message | ||
>The following PHP script doesn't pass $course ("statistics") to the next
>script. Why?
>
><?php
>// file: "root/reg_users_2.php", updated: 07/06/02
>set_time_limit(300);
>session_start();
>session_register("course");
>$course="statistics";
>header ("location:estadisticas/contents.php");
>flush();
>exit;
>?>
Three problems.
1. You are missing a space after the : in your header("Location: ...");
2. Location should be capitalized.
3. You are sending Cookie headers (session_start) and Location header in the
same script, and that just won't work.
Don't do the Location.
Use a META tag, or re-design your application to just give them the contents
they want right there, not go off to some other page to give them the
contents.
--
Like Music? http://l-i-e.com/artists.htm