I'm very new to php so I apologize if this question does not make sense or is quite obvious.
I am trying to create a form with just a simple dropdown field where a user selects a page to go to and then clicks submit and it takes them to that page.
I'm under the impression that the header function will send a http url to the user and redirect them to a chosen page... is this correct?
If this is correct I've created the form in a seperate html page and the action is set to action="script.php" where the php in that file reads as follows:
<?php
$filter = $_REQUEST['series'] ;
if ($filter == 'lido_series') {
header ("http://www.myurl.com.au/page1");
} else {header ("http://www.myurl.com.au") ;
}
?>
Now I read the above to be saying "Set the field named 'series' from the form to $filter, If $filter is equal to 'lido_series' send user to http://www.myurl.com.au/page1, If $filter does not equal 'lido_series' send user to http://www.myurl.com.au"
However when I test the script it takes me to script.php and shows a blank page.
Am I going about this the wrong way? Or have I done something wrong? Any help would be appreciated. Thanks.