When I submit my form the variables are sent to the url in my address bar and not to the php post page (resersend.php).
Here is the pertinent html page code (index.html)…
[code]
Reservation month: Choose One May 2011 June 2011 July 2011 August 2011 September 2011 October 2011 November 2011 December 2011 January 2012 February 2012 March 2012 April 2012
[/code]And here is the php code from the page (reserv.php) that works with the above html page…
[php]<?php
$q=$_GET[“q”];
$con = mysql_connect(‘My_host’, ‘my_user’, ‘my_password’);
if (!$con)
{
die('Could not connect: ’ . mysql_error());
}
mysql_select_db(“my_db”, $con);
$sql=“SELECT *
FROM daterange
WHERE DEND > DATE(NOW())
AND STATUS=‘A’ AND MONTH = '”.$q."’
ORDER BY RID, DATE, SITE";
$result = mysql_query($sql);
// Determine the number of reservation dates
$number = mysql_numrows($result);
// Create drop-down menu of reservation dates
print “<font size=“3” face=“Arial”>Select Your Reservation:
<form action=“resersend.php” method=“post”>
<select name=“RID”>
<option value=”">Choose One";
for ($i=0; $i<$number; $i++) {
$RID = mysql_result($result,$i,“RID”);
$DATE = mysql_result($result,$i,“DATE”);
$SITE = mysql_result($result,$i, “SITE”);
$PRICE = mysql_result($result,$i, “PRICE”);
print “<option value=”$RID">$DATE, $SITE, $PRICE";
}
print "
<font size=“3” face=“Arial”>First Name: <input type=“text” name=“FNAME” size=“50” maxlength=“50” tabindex=“1"
”;
print "
Last Name: <input type=“text” name=“LNAME” size=“50” maxlength=“50” tabindex=“2"
”;
print "
Address Line 1: <input type=“text” name=“ADDR1” size=“50” maxlength=“50” tabindex=“3"
”;
print "
Address Line 2: <input type=“text” name=“ADDR2” size=“50” maxlength=“50” tabindex=“4"
”;
print "
City: <input type=“text” name=“CITY” size=“50” maxlength=“50” tabindex=“5"
”;
print "
State (abbrev.): <input type=“text” name=“STATE” size=“2” maxlength=“2” tabindex=“6"
”;
print "
Zip Code: <input type=“text” name=“ZIP” size=“5” maxlength=“5” tabindex=“7"
”;
print "
Contact Phone Number: (<input type=“text” name=“PHONE1” size=“3” maxlength=“3” tabindex=“8"”;
print ")<input type=“text” name=“PHONE2” size=“3” maxlength=“3” tabindex=“9"”;
print "-<input type=“text” name=“PHONE3” size=“4” maxlength=“4” tabindex=“10"
”;
print "
Email: <input type=“text” name=“EMAIL” size=“50” maxlength=“50” tabindex=“11"
”;
print “
<input type=“submit” value=“Book Now!”
name=“submit”>”;
print “<input type=“reset” value=“reset”
name=“reset”>”;
// Close the database connection
mysql_close($con);
?>[/php]
I am sure this is easy, but any help would be greatly appreciated. Thanks.