Passing variables through a page

From: Date: Sun, 05 Jan 2003 20:24:17 +0000
Subject: Passing variables through a page
Groups: php.db 
Request: Send a blank email to php-db+get-24571@lists.php.net to get a copy of this message
I have a page (dept_select) with two drop down lists populated from a table in a MySQL Database. If one item is selected in either of the lists I need to go to one page (5-14_select_area.php). If any other item is selected I need to go to another page (add_new_resources.php) but I need to pass the selected items to add_new_resources.php. At the moment I have created a page between dept_select.php and the other pages and added the following code to it: <?php if ($department=="5-14 Curriculum") { header("Location:5-14_select_area.php"); } elseif ($level=="5-14 Curriculum") { header("Location:5-14_select_area.php"); } else { header("Location:add_new_resources.php"); } ?> I have tried creating a form on the page and passing the variables via hidden fields but have not got this to work. If anyone can understand what I am trying to do I would be grateful for any help.

« previous php.db (#24571) next »