PDA

View Full Version : HTML contact form


awg
08-04-2007, 05:05 PM
Hello guys!
Just wondering if any one can help me set up my contact form on the template i have just got. when some one fills out the form how do i get the form to send to my email address please?

Here is the HTML code on the contact page:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title></title>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="100%" style="height:100%;">
<tr>
<td style="width:100%; height:700px;"><table class="e3">
<tr>
<td class="rez"><table>
<tr><td class="rez1"></td></tr>
<tr><td class="rez2"></td></tr>
<tr><td class="rez3"></td></tr>
</table></td>
<td style="width:766px;"><table style="width:766px;">
<!--top-->
<tr>
<td class="top1"><table>
<tr>
<td class="top2"><a href="index.html">
<img alt="" src="images/logo.gif" width="200" height="63"></a></td>
<td><table class="top3">
<tr>
<td><a href="index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('image1','','images/m1m.jpg',1)">
<img alt="" src="images/m1.jpg" name="image1" width="98" height="95"></a></td>
<td><a href="index-1.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('image2','','images/m2m.jpg',2)">
<img alt="" src="images/m2.jpg" name="image2" width="74" height="95"></a></td>
<td><a href="index-2.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('image3','','images/m3m.jpg',3)">
<img alt="" src="images/m3.jpg" name="image3" width="73" height="95"></a></td>
<td><a href="index-3.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('image4','','images/m4m.jpg',4)">
<img alt="" src="images/m4.jpg" name="image4" width="62" height="95"></a></td>
<td>
<img alt="" src="images/m5m.jpg" width="123" height="95"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<!--content-->
<tr>
<td class="w2"><table class="w1">
<tr>
<td class="w3"><table style="margin:31px 0 35px 63px;">
<tr>
<td style="height:273px;"><table style="height:100%;">
<tr>
<!--left-->
<td width="196"><table width="178">
<tr><td class="h" style="height:31px;">Our Address: </td></tr>
<tr><td>
<img alt="" src="images/5f1.jpg" style="margin-bottom:12px;" width="178" height="85"></td></tr>
<tr><td>
Conost lestecial uno dela lamoriteeselor dela siumonost de la mosesteo delrrem ipsum dolor sit amet consectetueresent vestibulum molestie lenean nonummy.
<br><br style="line-height:15px;">
9863 - 9867 Mill Road, <br>
Cambridge, MG09 99HT <br>
Tel: &nbsp; +1 989 998 92 90<br>
Fax: &nbsp;+1 989 998 92 90<br>
<br><br style="line-height:8px;">
<a href="#">Read more</a>
</td></tr>
</table></td>
<td class="b_bgr"><table style="width:2px; height:100%;">
<tr><td class="b_bgr1"></td></tr>
</table></td>
<td><img alt="" src="images/spacer.gif" width="16" height="1"></td>
<!--right-->
<td><table width="428">
<tr><td class="h">Contact Form: </td></tr>
<tr><td>Aenean nonummy hendrerit mauris. Phasellus pusce suscipit variuum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculusulla duice feugiat malesuada odio. </td></tr>
<tr>
<td class="f1"><form id="form" action="" enctype="multipart/form-data" name="form"><table style="margin:16px 0 0 0;">
<tr>
<td width="217"><table width="217">
<tr><td>Your full name:</td></tr>
<tr><td>
<input type="text" size="20"></td></tr>
<tr><td>E-mail address:</td></tr>
<tr><td>
<input type="text" size="20"></td></tr>
<tr><td>Your telephone:</td></tr>
<tr><td>
<input type="text" size="20"></td></tr>
<tr><td>Your fax:</td></tr>
<tr><td>
<input type="text" size="20"></td></tr>
</table></td>
<td><table>
<tr><td>Your message:</td></tr>
<tr><td><textarea cols="2" rows="2"></textarea></td></tr>
<tr><td style="padding:0 0 0 112px;"><a href="#" onclick="document.getElementById('form').reset()">Reset</a><img alt="" src="images/spacer.gif" width="28" height="1"><a href="#" onclick="document.getElementById('form').submit()">Submit</a></td></tr>
</table></td>
</tr>
</table></form></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<!--footer-->
<tr><td class="fot1">Design Bureau &copy; 2007 | <a href="index-5.html">Privacy Policy</a></td></tr>
</table></td>
<td class="rez"><table>
<tr><td class="rez4"></td></tr>
<tr><td class="rez5"></td></tr>
<tr><td class="rez6"></td></tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td class="e3"><table class="e3">
<tr>
<td class="e1"></td>
<td class="e"><table>
<tr><td></td></tr>
</table></td>
<td class="e2"></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>

Thanks

awg
08-06-2007, 09:22 AM
Hmmmmm it seems no one knows lol. On my contact page how do I activate the "submit" button? Or how can i direct the submitted information on the form to my email?

powermike81
07-04-2008, 05:43 AM
To submit forms you need a back end script like PHP or CGI(also javascript but its not as reliable). This will allow you to send the form to your email or submit it to a page. What i would recommend is organise your hosting with a company that organises this for you. I use yahoo and they have they script ready to go i just type the link into my html form tag.

powermike81
07-04-2008, 05:56 AM
To submit forms you need a back end script like PHP or CGI(also javascript but its not as reliable). This will allow you to send the form to your email or submit it to a page. What i would recommend is organise your hosting with a company that organises this for you. I use yahoo and they have they script ready to go i just type the link into my html form tag.

yell0wdart
07-05-2008, 09:32 PM
Yep, you'll need to use some server technology to submit the email for you. PHP's fairly easy to pick up. I'd highly recommend validating your form input, as well, to protect against email header injection (not sure that Yahoo's will do that).