Hello. I am currently working on a website to post some articles I write for my friends. The problem I am currently having is with a dynamic redirect. I have a dropdown list that is populated dynamically from a mysql database. That part is working fine but I can't get the redirect to include the id number of the selected item in the dropdown list. I want to redirect the user to another file on the same site where the ?id= the id of the selected month. If I change both instances of post in the below code to get and click go it shows the correct id number in the address bar but does not redirect. Keeping the below code as is causes it to redirect but the id number is blank so no page shows up. Any help you can provide would be appreciated.
echo '</td><form action="httest.php" method="post"><td>
<SELECT NAME=months>
<OPTION VALUE=0>Choose Month</option>='.$months.'
</SELECT><input type="submit" name="month" value="Go"></td></form>';
if (isset($_POST['month'])){
$pid = $_post['months'];
header("HTTP/1.1 301 Moved Permanently");
header("Location: arttest.php?id=$pid");
exit();
}