Form Post Not Working
Posted: Fri Nov 25, 2011 12:32 pm
Hi,
I've been trying to work this out for a while now but can't find any similar scenario. I taught myself PHP to build a specific website. Here is the page in question:
http://www.crabtree-confectionery.co.uk/Contact
My problem is that I can only get it to work if both <form> elements are present in the code below - if I remove the first form element it seems to post to itself or something, refreshing the page; removing the values from the form and putting the values from the form into the address bar.
Having two form elements is only a problem for IE too - seems to try and render another big section (i hate IE!)
Sorry if this has been covered or its an obvious problem - I can't get my head round it!!
Thanks for your help
Thomas
I've been trying to work this out for a while now but can't find any similar scenario. I taught myself PHP to build a specific website. Here is the page in question:
http://www.crabtree-confectionery.co.uk/Contact
My problem is that I can only get it to work if both <form> elements are present in the code below - if I remove the first form element it seems to post to itself or something, refreshing the page; removing the values from the form and putting the values from the form into the address bar.
Having two form elements is only a problem for IE too - seems to try and render another big section (i hate IE!)
Sorry if this has been covered or its an obvious problem - I can't get my head round it!!
Thanks for your help
Thomas
Code: Select all
<?php include 'Includes/head.php';?>
<?php include 'Includes/header.php';?>
<h1>
Contact Us
</h1>
<div id="container">
<div class="LeftContentLarge">
<p style="font-size:20; color:black">Interested in hiring a sweet stand?</p>
<br>
Simply contact us using one of the options below and we'll get back to you soon.<br><br>
<br>
<table style="border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px;
border: 1px solid #000; padding: 10px; -webkit-box-shadow: 5px 5px 10px #000">
<tr>
<td>
<p style="color:red"><?php echo $_GET["Message"];?></p>
</td>
</tr>
<tr>
<td>
<form name="form" method="post" action="Thanks"></form>
<a name="form"></a>
<form name="form1" method="post" action="Thanks"></form>
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td>Name</td>
<td>:</td>
<td><input name="name" type="text" id="name" size="50"></td>
</tr>
<tr>
<td>Email</td>
<td>:</td>
<td><input name="email" type="text" id="customer_mail" size="50"></td>
</tr>
<tr>
<td width="16%">Telephone</td>
<td width="2%">:</td>
<td width="82%"><input name="phone" type="text" id="subject" size="50"></td>
</tr>
<tr><td>Query Type</td><td>:</td>
<td><select name="QueryType">
<option value="">Please Select</option>
<option value="Sweet Stand">Sweet Stand</option>
<option value="Sweet Cart">Sweet Cart</option>
<option value="Favours">Favours</option>
<option value="Sweet Selections">Sweet Selections</option>
<option value="Gifts">Gifts</option>
<option value="Other">Other</option>
</select>
<ttd>
</tr>
<tr>
<td>Message / Comments</td>
<td>:</td>
<td><textarea name="message" cols="50" rows="4" id="detail"></textarea></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type="submit" name="Submit" value="Submit"> <input type="reset" name="Submit2" value="Reset"></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<!-- Facebook Badge START --><a href="http://www.facebook.com/crabtreeconfectionery" target="_TOP" style="font-family: "lucida grande",tahoma,verdana,arial,sans-serif; font-size: 11px; font-variant: normal; font-style: normal; font-weight: normal; color: #3B5998; text-decoration: none;" title="Crabtree Confectionery">Crabtree Confectionery</a><br/><a href="http://www.facebook.com/crabtreeconfectionery" target="_TOP" title="Crabtree Confectionery"><img src="http://badge.facebook.com/badge/103158849747146.324.339420737.png" style="border: 0px;" /></a><br/><a href="http://www.facebook.com/business/dashboard/" target="_TOP" style="font-family: "lucida grande",tahoma,verdana,arial,sans-serif; font-size: 11px; font-variant: normal; font-style: normal; font-weight: normal; color: #3B5998; text-decoration: none;" title="Make your own badge!">Promote your Page too</a><!-- Facebook Badge END --><table class="tables" style="border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px;
border: 1px solid #000; padding: 10px; -webkit-box-shadow: 5px 5px 10px #000">
<tr>
<td>
<p style="color:black"><b>Phone =</b> 0778 633 2012</p>
</td>
</tr>
</table>
<table class="tables" style="border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px;
border: 1px solid #000; padding: 10px; -webkit-box-shadow: 5px 5px 10px #000">
<tr>
<td>
<a id="" href="mailto:crabtree.confectionery@gmail.com">
<p style="color:black"><b>Email =</b>crabtree.confectionery@gmail.com</p>
</a>
</td>
</tr>
</table>
</div>
</div>
<?php include 'Includes/footer.php';?>