Log in

View Full Version : Formmail Help



Dawn
08-30-2006, 10:29 AM
Hi I am updating a friends website ,they own a restuarant . Now up until a couple of days ago there form mail was working then I redesigned there site and even though the code looks the same it does not work :confused:
I have had a look everywhere regarding scripts for formmail and its the same as what I have on the site . it keeps giving me an error message saying invalid email , but I know there email is working ??? here is the page http://www.hightide.co.nz/booknow2.htm


here is the code I have on the site


<p align="center">
<table width="20%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><p align="center">

<table width="304" border=0 class="box">
<!--DWLayoutTable-->
<tr>
<th colspan=2> <p align="left"><br />
</p></th>
</tr>
<tr>
<th width="77" valign="top"> <p align="left"><font color="#666699">Name:
</font></p></th>
<td width="217"><input type=text name="realname"size=30> </td>
</tr>
<tr>
<th valign="top"> <p align="left"><font color="#666699">Phone: </font></p></th>
<td><input type=text name="phone"size=30> <br /></td>
</tr>
<tr>
<th valign="top"> <p align="left"><font color="#666699">Fax: </font></p></th>
<td><input type=text name="fax"size=30> <br /></td>
</tr>
<tr>
<th valign="top"> <p align="left"><font color="#666699">E-Mail: </font></p></th>
<td><input type=text name="email"size=30> <br /></td>
</tr>
<tr>
<th valign="top"><p align="left"><font color="#666699">Time:</font></p></th>
<td><input name="time" type=text id="time"size=30></td>
</tr>
<tr>
<th valign="top"><p align="left"><font color="#666699">Date:</font></p></th>
<td><select name="starting_date_d" class="forminput">
<option value="Day" >Day</option>
<option value="1" >1</option>
<option value="2" >2</option>
<option value="3" >3</option>
<option value="4" >4</option>
<option value="5" >5</option>
<option value="6" >6</option>
<option value="7" >7</option>
<option value="8" >8</option>
<option value="9" >9</option>
<option value="10" >10</option>
<option value="11" >11</option>
<option value="12" >12</option>
<option value="13" >13</option>
<option value="14" >14</option>
<option value="15" >15</option>
<option value="16" >16</option>
<option value="17" >17</option>
<option value="18" >18</option>
<option value="19" >19</option>
<option value="20" >20</option>
<option value="21" >21</option>
<option value="22" >22</option>
<option value="23" >23</option>
<option value="24" >24</option>
<option value="25" >25</option>
<option value="26" >26</option>
<option value="27" >27</option>
<option value="28" >28</option>
<option value="29" >29</option>
<option value="30" >30</option>
<option value="31" >31</option>
</select> <select name="starting_date_M" class="forminput">
<option value="Month" >Month</option>
<option value="January" >January</option>
<option value="February" >February</option>
<option value="March" >March</option>
<option value="April" >April</option>
<option value="May" >May</option>
<option value="June" >June</option>
<option value="July" >July</option>
<option value="August" >August</option>
<option value="September" >September</option>
<option value="October" >October</option>
<option value="November" >November</option>
<option value="December" >December</option>
</select> <select name="starting_date_Y" class="forminput">
<option value="Year">Year</option>
<option value="2015" >2015</option>
<option value="2014" >2014</option>
<option value="2013" >2013</option>
<option value="2012" >2012</option>
<option value="2011" >2011</option>
<option value="2010" >2010</option>
<option value="2009" >2009</option>
<option value="2008" >2008</option>
<option value="2007" >2007</option>
<option value="2006" >2006</option>
</select> </td>
</tr>
<tr>
<th valign="top"><p align="left"><font color="#666699">Number of <br />
People:</font></p></th>
<td><input name="people" type=text id="people2"size=30></td>
</tr>
<tr>
<th> <p align="left"><font color="#666699">Comments:</font></p></th>
<td><textarea name="comments" cols=23 rows=10></textarea></td>
</tr>
</table>
<p> <form action="http://www.ihug.co.nz/cgi-bin/mailto" name="booking" method="post">

<input name="submit" type="submit" value="submit">
<input type=hidden name="recipient" value="email@es.co.nz">
</form>
</p>

<p align="center"><strong><font color="#666699">We will contact you once
we receive your email to confirm your booking .</font></strong> </p></td>

I have taken off his real email but this is just to give you a view of the code , hope someone can help :-)

mwinter
08-30-2006, 01:06 PM
Hi I am updating a friends website ...

You might consider updating the markup, whilst you're at it. Don't use XHTML, don't use a Transitional document type (use Strict), and use CSS not markup for presentation.



Now up until a couple of days ago there form mail was working then I redesigned there site and even though the code looks the same it does not work

The form start tag is in the wrong place, for a start: the form won't contain any of the data that the user enters because those controls are not descendants of the form element.

Mike

Dawn
08-30-2006, 07:12 PM
Hi
This code has worked before whritten this way ? , where is the form start suppose to go??

mwinter
08-30-2006, 08:29 PM
This code has worked before whritten this way

I find that difficult to believe.



where is the form start suppose to go??

As I wrote before, the form controls you want to submit need to be descendants of the form element; the form needs to completely encompass the table.

I'll also restate that the markup you posted is horrible. If you use Dreamweaver, you cannot allow it output junk like this.

Mike

Dawn
08-31-2006, 05:54 AM
Hi thanks , when I took over there site this is how the code was and they got mail , it was only now that the code has stopped working , I never use formmail so if it was not suppose to work written that way then I have no idea why it did ?