Results 1 to 8 of 8

Thread: HTML contact form

  1. #1
    Join Date
    Aug 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default HTML contact form

    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

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    You have one of three options:

    1. set the action attribute in the form to mailto: youremail@domain.com
    2. create a server side script (PHP, ASP, etc) to send to your email address
    3. use a remotely hosted form to mail script.


    Options 2 and 3 are your best bets becuase they don't require the user to send the email from their email client (and this is very unreliable). If you use the second option, look around these forums or Google for a form mail script. The last option is the same as the second; however, instead of you hosting the script on your server, it is hosted on someone else's server.

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Aug 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Contact PhP file

    Hi thanks for your quick reply Is this file what you mean: Contact PhP file?

    inside File:



    <?
    Error_Reporting(E_ALL & ~E_NOTICE);

    while ($request = current($_REQUEST)) {
    if (key($_REQUEST)!='recipient') {
    $pre_array=split ("&777&", $request);
    $post_vars[key($_REQUEST)][0]=$pre_array[0];
    $post_vars[key($_REQUEST)][1]=$pre_array[1];
    }
    next($_REQUEST);
    }



    reset($post_vars);
    $subject="From ".$post_vars['your_name'][0] ;
    $headers= "From: ".$post_vars['your_email'][0] ."\n";
    $headers.='Content-type: text/html; charset=iso-8859-1';
    $message='';
    while ($mess = current($post_vars)) {
    if ((key($post_vars)!="i") && (key($post_vars)!="your_email") && (key($post_vars)!="your_name")) {

    $message.="<strong>".$mess[1]."</strong>&nbsp;&nbsp;&nbsp;".$mess[0]."<br>";
    }
    next($post_vars);
    }

    mail($_REQUEST['recipient'], $subject, "
    <html>
    <head>
    <title>Contact letter</title>
    </head>
    <body>
    <br>
    ".$message."
    </body>
    </html>" , $headers);
    echo ("Your message was successfully sent!");

    ?>
    <script>
    resizeTo(300, 300);
    </script>

    Can you get that working for me please?

  4. #4
    Join Date
    Aug 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Contact form

    Can any one help me to set it up please?

  5. #5
    Join Date
    Aug 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Contact Form

    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?

  6. #6
    Join Date
    Aug 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Why not just use a ready service like http://40secscontactfrom.com
    It has a spam protection function. It's very easy to install and use and there's a good description of your steps and a video tutorial.
    Hope this was helpful

  7. #7
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  8. #8
    Join Date
    Feb 2007
    Location
    🌎
    Posts
    528
    Thanks
    10
    Thanked 10 Times in 10 Posts
    Blog Entries
    2

    Default

    thank you!
    ....(o_ Penguins
    .---/(o_- techno_racing
    +(---//\-' in
    .+(_)--(_)' The McMurdo 500

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •