Alex Francis <[EMAIL PROTECTED]> wrote:
> 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.

I don't think there are many other possiblities, at least if you don't
want to use JavaScript (and I hope you don't).

Instead of the redirect, you could perhaps use require() to include one
of the two possible pages, and thus avoid one server-client roundtrip.

> 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");
> }
> ?>

The Location header requires an absolute URI, e.g.

I'm not sure whether this is a database question ;-)


PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to