Hi all I am very new to using php, I have a class project which I have to create a dynamic php page with a drop down selection menu. I have already created the pages for my project but when I choose the form I want and hit submit it doesnt redirected to the selection chosen.
This is the form and php code i have been working on. Thank you
<html> <title>Main Menu Page</title> <body> <h1>Main Menu Page</h1> <h2>Please Select one</h2>
<form action="#" method="GET">
<select name="Choose">
<option value="select one">Select One</option>
<option value="General Feedback">General Feedback</option>
<option value="Help Request">Help Request</option>
</select>
<input type="submit" name="submit" value="Submit" />
</form>
<?php
//loadPage.php
$requested_page = $_POST['selectedPage'];
switch($requested_page) {
case "General Feedback":
header("http://link2.php");
break;
case "Help Request":
header("http://link1.php");
}
?>
</body>
</html>