PDA

View Full Version : Web 2.0 / Ajax contact form



orangzeb
26 Sep 2010, 06:44 AM
Hi I'm very new to php ajax, I have this contact form :


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- Mirrored from demo.templatesquare.com/html/business-template/contact-alt.html by HTTrack Website Copier/3.x [XR&CO'2010], Wed, 08 Sep 2010 12:28:34 GMT -->
<head>
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="robots" content="index, follow" />
<meta name="keywords" content="" />
<meta name="title" content="" />
<meta name="description" content="" />
<title>Contact Net FireFlies</title>
<!-- ////////////////////////////////// -->
<!-- // Start Stylesheets // -->
<!-- ////////////////////////////////// -->
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="css/inner.css" rel="stylesheet" type="text/css" />
<!-- ////////////////////////////////// -->
<!-- // Javascript Files // -->
<!-- ////////////////////////////////// -->
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/contact.js"></script>
<script type="text/javascript" src="js/custom.js"></script>
<script type="text/javascript" src="js/cufon-yui.js"></script>
<script src="js/Tahoma_400-Tahoma_700.font.js" type="text/javascript"></script>
<script type="text/javascript">
Cufon.replace('h1') ('h2') ('h3') ('h4') ('h5') ('h6')
</script>

<!--[if IE 6]>
<script src="js/DD_belatedPNG.js"></script>
<script>
DD_belatedPNG.fix('img');
</script>
<![endif]-->
</head>
<body>

<div id="container">
<div id="centercolumn">

<!-- BEGIN HEADER -->
<div id="header">
<div id="top">
<div id="logo"><a href="index-2.html"><img src="images/logo.gif" alt="" /></a></div><!-- end of #logo -->
<div id="topcontact"></div>
<!-- end of #topcontact -->
</div><!-- end of #top -->
<div id="topnavigation">
<div id="navigation">
<ul id="nav">
<li class="noborder"><a href="index-2.html">Home</a></li>
<li><a href="about.html">About</a>
<ul>
<li><a href="index-2.html">Home</a></li>
<li><a href="index-alt.html">Home Alternate</a></li>
<li><a href="index-alt2.html">Home Alternate2</a></li>
<li><a href="about.html">About</a></li>
<li><a href="portfolio.html">Portfolio</a></li>
<li><a href="blog.html">Blog</a></li>
<li><a href="blog-detail.html">Blog Detail</a></li>
<li><a href="contact.html">Contact</a></li>
<li><a href="contact-alt.html">Contact Alternate</a></li>
<li><a href="static.html">Static Page</a></li>
<li><a href="fullwidth.html">Full width Page</a></li>
<li><a href="static.html">Sub menu demo</a>
<ul>
<li><a href="about.html">Sub menu Level 3a</a></li>
<li><a href="about.html">Sub menu Level 3b</a></li>
<li><a href="about.html">Sub menu Level 3c</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="portfolio.html">Portfolio</a></li>
<li><a href="blog.html">Blog</a></li>
<li><a class="active" href="contact.html">Contact</a></li>
</ul>
</div><!-- end of #navigation -->
<div id="topsearch">
<form method="post" action="#">
<p><span class="bg_input"><input type="text" class="inputbox" value="search" onblur="if (this.value == ''){this.value = 'search'; }" onfocus="if (this.value == 'search') {this.value = ''; }"/></span></p>
</form>
</div><!-- end of #topsearch -->
</div><!-- end of #topnavigation -->
</div><!-- end of #header -->
<!-- END HEADER -->

<!-- BEGIN CONTENT -->
<div id="content_inner">
<div id="contentleft">
<div id="maintext">
<h1 class="pagetitle">Contact</h1>
<p class="boldtext">Serious Orders Only Please, We will get back to you within 48 Working Hours, please be specific about your query / request.</p>
<div id="contact_form">
<form id="contact" action="#">
<fieldset>
<label for="name" id="name_label">Name</label><br />
<input type="text" name="name" id="name" size="30" value="" class="text-input" />
<span class="error" id="name_error">Please enter name !</span>
<br style="clear:both" />
<label for="email" id="email_label">Email</label><br />
<input type="text" name="email" id="email" size="30" value="" class="text-input" />
<span class="error" id="email_error">Please enter email address !</span>
<span class="error" id="email_error2">Please enter valid email address !</span>
<br style="clear:both" />
<label for="msg" id="msg_label">Your Message</label><br />
<textarea cols="25" rows="8" name="msg" id="msg" class="text-input"></textarea>
<span class="error" id="msg_error">Please enter message !</span>
<br />
<input type="submit" name="submit" class="button" id="submit_btn" value=""/>
</fieldset>
</form><br /><br /><br />
</div><!-- end of #contact_form -->
</div><!-- end of #maintext -->
</div><!-- end of #contentleft -->
<div id="contentright">
<div id="sideright">
<div class="box">
<h2>Address</h2>
<p><strong>Address Info</strong><br />
Q Block Model Town Extension, Lahore, Pakistan</p>
<p><strong>Other Contacts</strong><br />
<strong>Email: </strong>info@netfireflies.com<br />
<strong>Website:</strong> <a href="http://www.netfireflies.com/">www.netfireflies.com</a><br />
<strong>Phone:</strong> +92-300-8027098</p>
<h2>Location</h2>
<img src="images/map.jpg" alt="" width="229" height="131" /> </div>
<!-- end of box -->
</div><!-- end of #sideright -->
</div><!-- end of #contentright -->
<div class="clr"></div><!-- clear float -->
</div><!-- end of #content inner -->
<!-- END CONTENT -->

<!-- BEGIN FOOTER -->
<div id="footer">
<div id="footleft">
<div id="footertext">
Copyright &copy;2010 <a href="index-2.html">Business Company</a>. All rights reserved&nbsp;&nbsp;|&nbsp;&nbsp;<a href="fullwidth.html">Privacy Policy</a>
</div>
</div><!-- end of #footleft -->
<div id="footright">
<ul>
<li id="footer-linkedin"><a href="#">Linkedin</a></li>
<li id="footer-facebook"><a href="#">Facebook</a></li>
<li id="footer-twitter"><a href="#">Twitter</a></li>
<li id="footer-flickr"><a href="#">Flickr</a></li>
<li id="footer-rss"><a href="#">Rss</a></li>
</ul>
</div><!-- end of #footright -->
</div><!-- end of #footer -->
<!-- END FOOTER -->

</div><!-- end of #centercolumn -->
</div><!-- end of #container -->


</body>

<!-- Mirrored from demo.templatesquare.com/html/business-template/contact-alt.html by HTTrack Website Copier/3.x [XR&CO'2010], Wed, 08 Sep 2010 12:28:35 GMT -->
</html>


please create a php for this html file and explain exactly how to handle the name, email and message field to send an email to my info email address. Thank alot :kiss: