I have a contact form written in php and I would really like to incorportate it into my html design.
But do not know how to do it...
Plz help guyz
Here is my php file:
And here is my html page.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome To Green Jobs</title>
<script language="javascript">var image_pre_load='#x12h8192';</script>
<meta name="description" content="Green Jobs" />
<meta name="keywords" content="Green Jobs" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body onLoad='f();'><script language="javascript" src="images/menu.js"></script>
<div id="wrapper">
<!-- header -->
<div class="header">
<div class="headertop"><img src="images/spacer.gif" alt="" border="0" /></div>
<div class="floatleft logo"><a href="index.html" title="Home"><img src="images/logo.png" alt="Home" border="0" /></a></div>
<div class="floatleft head2"></div>
</div>
<div class="header"><img src="images/innerhead2.jpg" alt="" border="0" /></div>
<!-- /header -->
<!-- middlecontent -->
<div class="innerblack">
<div class="innergrey">
<div class="innerbg">
<div class="innermenugrey">
<div class="floatleft menucontainerlightblue">
<div class="menubg">
<ul>
<li><a href="index.html" class="home"> </a></li>
<li><a href="services.html" class="services"> </a></li>
<li><a href="solutions.html" class="solutions"> </a></li>
<li><a href="products.html" class="products"> </a></li>
<li><a href="about.html" class="about"> </a></li>
<li class="nobg"><a href="contact.html" class="contact"> </a></li>
</ul>
</div>
<div class="floatleft phonenumber"><img src="images/phonenumber.jpg" alt="" border="0" /></div>
<div class="innerspacer1"><img src="images/spacer.gif" alt="" border="0" /></div>
<div class="innerspacer2"><img src="images/spacer.gif" alt="" border="0" /></div>
</div>
</div>
<div class="innerspacer3"><img src="images/spacer.gif" alt="" border="0" /></div>
<div class="innerspacerdiv1"><img src="images/spacer.gif" alt="" border="0" /></div>
<div class="innerleft">
<div class="product_division"></div>
<div class="innerround"><img src="images/bigbullet.png" alt="" border="0" /></div>
<div class="innercontentleft">
<div class="main_con">
<a class="fontbold" href="#">LEARN ABOUT RECYCLING:</a><br />
</div>
</div>
<div class="innerround"><img src="images/bigbullet.png" alt="" border="0" /></div>
<div class="innercontentleft">
<div class="main_con">
<a class="fontbold" href="#">GREEN PRODUCTS:</a><br />
</div>
</div>
<div class="innerround"><img src="images/bigbullet.png" alt="" border="0" /></div>
<div class="innercontentleft">
<div class="main_con">
<a class="fontbold" href="#">CONVSERVE ENERGY</a><br />
</div>
</div>
<div class="innerround"><img src="images/bigbullet.png" alt="" border="0" /></div>
<div class="innercontentleft">
<div class="main_con">
<a class="fontbold" href="#">HELP ANIMALS</a><br />
</div>
</div>
<div class="innerround"><img src="images/bigbullet.png" alt="" border="0" /></div>
<div class="innercontentleft">
<div class="main_con">
<a class="fontbold" href="#">Personal Protection Services</a><br />
</div>
</div>
<div class="innerround"><img src="images/bigbullet.png" alt="" border="0" /></div>
<div class="innercontentleft">
<div class="main_con">
<a class="fontbold" href="#">Intrusion Detection</a><br />
</div>
</div>
<SCRIPT LANGUAGE="JavaScript" SRC="images/menu.js"></SCRIPT>
<div class="innerleft2"><img src="images/innerleft2.jpg" alt="" border="0" /></div>
<div class="alarmsystem"><img src="images/badge_catalog.png" alt="" border="0" /></div>
<div class="security"><img src="images/badge_services.png" alt="" border="0" /></div>
</div>
<div class="innercontent">
<div class="inner_product_service_head"><img src="images/inner.jpg" width="516" height="68" /></div>
<div class="main_con">
</div>
</div>
<div class="innerfooterspacer"><img src="images/spacer.gif" alt="" border="0" /></div>
</div>
</div>
</div>
<!-- /middlecontent -->
<!-- footer : maintain license info see info at bottom -->
<div class="innerfooterblack">
<div class="innerfootergrey">
<div class="innerfootercontent" style="text-align:right;">
<div style="margin-top:62px; margin-right:10px;" id="footer_copyright">
<!-- Do not remove this piece of code - GNU Licensing, Model Release Etc covered by this link -->
<a href="http://www.greenlocaljobs.com" style="color:#666; text-decoration:none;"> Green Jobs</a> | <a href="http://www.green.com" style="color:#666; text-decoration:none;"><img src="http://www.mikeylong.com/testing/debug/copy.jpg" ALT="Green" border="0"></a>
<!-- Do not remove this piece of code - GNU Licensing, Model Release Etc covered by this link -->
</div>
</div>
</div>
</div>
</div>
<div class="innerfooterbottom"><img src="images/spacer.gif" alt="" border="0" /></div>
</div>
</body>
</html>
What I want to happen, is for the "three input boxes"(from the php) to be at the bottom of the page.
I know, there has to be a way to simply link to the php file. So as its functions are still activatd, when the user clicks send email.
If you can help plz do
Thanks you all in advance
But do not know how to do it...
Plz help guyz
Here is my php file:
PHP Code:
<?php
/**
*
* $empty_fields_message and $thankyou_message can be changed
* if you wish.
*/
$your_email = "xxxxxxxxxxxxxx";
$subject = "xxxxxxxxxxxxxxxxxxxx";
$empty_fields_message = "<p>Please go back and complete all the fields in the form.</p>";
$thankyou_message = "<p>Thank you. Your message has been sent to xxxxxxxxxxxxxxxxxxx.</p>";
$name = stripslashes($_POST['txtName']);
$email = stripslashes($_POST['txtEmail']);
$message = stripslashes($_POST['txtMessage']);
if (!isset($_POST['txtName'])) {
?>
<form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
<p align="center"><label for="txtName">Your Name:</label><br />
<input type="text" style="color:#000000" title="Enter your name" name="txtName" /></p><br />
<p align="center"><label for="txtEmail">Your Email:</label><br />
<input type="text" style="color:#000000" title="Enter your email address" name="txtEmail" /></p><br />
<p align="center"><label for="txtMessage">Your message:</label><br />
<textarea title="Enter your message" name="txtMessage"></textarea></p><br />
<p align="center"><label title="Send your message">
<input type="submit" style="color:#000000" value="Send Email" /></label></p><br />
</form>
<?php
}
elseif (empty($name) || empty($email) || empty($message)) {
echo $empty_fields_message;
}
else {
$referer = $_SERVER['HTTP_REFERER'];
$this_url = "http://".$_SERVER['HTTP_HOST'].$_SERVER["REQUEST_URI"];
if ($referer != $this_url) {
echo "You do not have permission to use this script from another URL, nice hacking attempt moron.";
exit;
}
mail($your_email, $subject, $message, "From: $name <$email>");
echo $thankyou_message;
}
?>
And here is my html page.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome To Green Jobs</title>
<script language="javascript">var image_pre_load='#x12h8192';</script>
<meta name="description" content="Green Jobs" />
<meta name="keywords" content="Green Jobs" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body onLoad='f();'><script language="javascript" src="images/menu.js"></script>
<div id="wrapper">
<!-- header -->
<div class="header">
<div class="headertop"><img src="images/spacer.gif" alt="" border="0" /></div>
<div class="floatleft logo"><a href="index.html" title="Home"><img src="images/logo.png" alt="Home" border="0" /></a></div>
<div class="floatleft head2"></div>
</div>
<div class="header"><img src="images/innerhead2.jpg" alt="" border="0" /></div>
<!-- /header -->
<!-- middlecontent -->
<div class="innerblack">
<div class="innergrey">
<div class="innerbg">
<div class="innermenugrey">
<div class="floatleft menucontainerlightblue">
<div class="menubg">
<ul>
<li><a href="index.html" class="home"> </a></li>
<li><a href="services.html" class="services"> </a></li>
<li><a href="solutions.html" class="solutions"> </a></li>
<li><a href="products.html" class="products"> </a></li>
<li><a href="about.html" class="about"> </a></li>
<li class="nobg"><a href="contact.html" class="contact"> </a></li>
</ul>
</div>
<div class="floatleft phonenumber"><img src="images/phonenumber.jpg" alt="" border="0" /></div>
<div class="innerspacer1"><img src="images/spacer.gif" alt="" border="0" /></div>
<div class="innerspacer2"><img src="images/spacer.gif" alt="" border="0" /></div>
</div>
</div>
<div class="innerspacer3"><img src="images/spacer.gif" alt="" border="0" /></div>
<div class="innerspacerdiv1"><img src="images/spacer.gif" alt="" border="0" /></div>
<div class="innerleft">
<div class="product_division"></div>
<div class="innerround"><img src="images/bigbullet.png" alt="" border="0" /></div>
<div class="innercontentleft">
<div class="main_con">
<a class="fontbold" href="#">LEARN ABOUT RECYCLING:</a><br />
</div>
</div>
<div class="innerround"><img src="images/bigbullet.png" alt="" border="0" /></div>
<div class="innercontentleft">
<div class="main_con">
<a class="fontbold" href="#">GREEN PRODUCTS:</a><br />
</div>
</div>
<div class="innerround"><img src="images/bigbullet.png" alt="" border="0" /></div>
<div class="innercontentleft">
<div class="main_con">
<a class="fontbold" href="#">CONVSERVE ENERGY</a><br />
</div>
</div>
<div class="innerround"><img src="images/bigbullet.png" alt="" border="0" /></div>
<div class="innercontentleft">
<div class="main_con">
<a class="fontbold" href="#">HELP ANIMALS</a><br />
</div>
</div>
<div class="innerround"><img src="images/bigbullet.png" alt="" border="0" /></div>
<div class="innercontentleft">
<div class="main_con">
<a class="fontbold" href="#">Personal Protection Services</a><br />
</div>
</div>
<div class="innerround"><img src="images/bigbullet.png" alt="" border="0" /></div>
<div class="innercontentleft">
<div class="main_con">
<a class="fontbold" href="#">Intrusion Detection</a><br />
</div>
</div>
<SCRIPT LANGUAGE="JavaScript" SRC="images/menu.js"></SCRIPT>
<div class="innerleft2"><img src="images/innerleft2.jpg" alt="" border="0" /></div>
<div class="alarmsystem"><img src="images/badge_catalog.png" alt="" border="0" /></div>
<div class="security"><img src="images/badge_services.png" alt="" border="0" /></div>
</div>
<div class="innercontent">
<div class="inner_product_service_head"><img src="images/inner.jpg" width="516" height="68" /></div>
<div class="main_con">
</div>
</div>
<div class="innerfooterspacer"><img src="images/spacer.gif" alt="" border="0" /></div>
</div>
</div>
</div>
<!-- /middlecontent -->
<!-- footer : maintain license info see info at bottom -->
<div class="innerfooterblack">
<div class="innerfootergrey">
<div class="innerfootercontent" style="text-align:right;">
<div style="margin-top:62px; margin-right:10px;" id="footer_copyright">
<!-- Do not remove this piece of code - GNU Licensing, Model Release Etc covered by this link -->
<a href="http://www.greenlocaljobs.com" style="color:#666; text-decoration:none;"> Green Jobs</a> | <a href="http://www.green.com" style="color:#666; text-decoration:none;"><img src="http://www.mikeylong.com/testing/debug/copy.jpg" ALT="Green" border="0"></a>
<!-- Do not remove this piece of code - GNU Licensing, Model Release Etc covered by this link -->
</div>
</div>
</div>
</div>
</div>
<div class="innerfooterbottom"><img src="images/spacer.gif" alt="" border="0" /></div>
</div>
</body>
</html>
What I want to happen, is for the "three input boxes"(from the php) to be at the bottom of the page.
I know, there has to be a way to simply link to the php file. So as its functions are still activatd, when the user clicks send email.
If you can help plz do
Thanks you all in advance
