|
Author |
Message |
mkdesigns
Joined: 07 Mar 2009
Posts: 9
|
Posted: Sat Mar 07, 2009 4:55 pm Post subject: php script problem |
|
|
Okay, I designed everything in photoshop and then sliced and brought it into dreamweaver.
This is my code for my contact form page:
Code: |
<html>
<head><div align="center">
<title>comments</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.style1 {color: #61162d}
-->
</style>
</head><center></center>
<body bgcolor="#efeee4" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- ImageReady Slices (comments.psd) --><div align="center">
<table id="Table_01" width="801" height="801" border="0" cellpadding="0" cellspacing="0">
<tr>
<td rowspan="19">
<img src="images/comments_01.jpg" width="50" height="800" alt=""></td>
<td colspan="15">
<img src="images/comments_02.jpg" width="370" height="22" alt=""></td>
<td>
<a href="index.html"><img src="images/comments_03.jpg" alt="" width="55" height="22" border="0"></td>
<td>
<img src="images/comments_04.jpg" width="19" height="22" alt=""></td>
<td colspan="2">
<a href="aboutus.html"><img src="images/comments_05.jpg" alt="" width="84" height="22" border="0"></a></td>
<td>
<img src="images/comments_06.jpg" width="21" height="22" alt=""></td>
<td>
<a href="contactus.html"><img src="images/comments_07.jpg" alt="" width="101" height="22" border="0"></a></td>
<td colspan="2">
<img src="images/comments_08.jpg" width="100" height="22" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="22" alt=""></td>
</tr>
<tr>
<td colspan="13">
<img src="images/comments_09.jpg" width="308" height="19" alt=""></td>
<td colspan="9" rowspan="2">
<img src="images/comments_10.jpg" width="392" height="178" alt=""></td>
<td rowspan="18">
<img src="images/comments_11.jpg" width="50" height="778" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="19" alt=""></td>
</tr>
<tr>
<td colspan="13">
<img src="images/comments_12.jpg" width="308" height="159" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="159" alt=""></td>
</tr>
<tr>
<td colspan="10" rowspan="2">
<img src="images/comments_13.jpg" width="157" height="24" alt=""></td>
<td colspan="12">
<img src="images/comments_14.jpg" width="543" height="12" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="12" alt=""></td>
</tr>
<tr>
<td colspan="12" rowspan="13"><form name="form1" method="post" action="contactformprocess.php" align="center">
<table width="425" border="0" cellpadding="6" cellspacing="0" bgcolor="#efeee4">
<tr>
<td><label for="email"> </label>
<div align="right" class="style1">Email Address:</div></td>
<td><div align="left">
<input name="email address" type="text" id="email address" size="35" maxlength="100">
</div></td>
</tr>
<tr>
<td><label for="name"> </label>
<div align="right" class="style1">Name:</div></td>
<td><div align="left">
<input name="name" type="text" id="name" size="35" maxlength="80">
</div></td>
</tr>
<tr>
<td><label for="address"> </label>
<div align="right" class="style1">Address:</div></td>
<td><div align="left">
<input name="address" type="text" id="address" size="35" maxlength="12">
</div></td>
</tr>
<tr>
<td><label for="city"> </label>
<div align="right" class="style1">City:</div></td>
<td><div align="left">
<input name="city" type="text" id="city" size="35" maxlength="12">
</div></td>
</tr>
<tr>
<td><label for="state"> </label>
<div align="right" class="style1">State:</div></td>
<td><div align="left">
<input name="state" type="text" id="state" size="35" maxlength="12">
</div></td>
</tr>
<tr>
<td><label for="zip"> </label>
<div align="right" class="style1">Zip:</div></td>
<td><div align="left">
<input name="zip" type="text" id="zip" size="35" maxlength="12">
</div></td>
</tr>
<tr>
<td><label for="phone"> </label>
<div align="right" class="style1">Phone:</div></td>
<td><div align="left">
<input name="phone" type="text" id="phone" size="35" maxlength="12">
</div></td>
</tr>
<tr>
<td><div align="right">
<label for="comments"><span class="style1">Comments:</span></label>
</div></td>
<td><div align="left">
<textarea name="comments" id="comments" cols="26" rows="5"></textarea>
</div></td>
</tr>
<tr>
<td><div align="right"></div></td>
<td><div align="left">
<input name="newsletter" type="checkbox" id="newsletter" value="subscribe me" checked>
<label for="newsletter"><span class="style1">Check if you want to receive updates, news, or speical events notifications.</span></label>
</div></td>
</tr>
<tr>
<td><div align="right">
<label for="clear"></label>
<input type="reset" name="clear" id="clear" value="Reset Form">
</div></td>
<td><div align="right">
<label for="submit"></label>
<div align="left">
<input type="submit" name="submit" id="submit" value="Send Email!">
</div>
</div></td>
</tr>
</table>
<p align="center"> </p>
</form> </td>
<td>
<img src="images/spacer.gif" width="1" height="12" alt=""></td>
</tr>
<tr>
<td rowspan="11">
<img src="images/comments_16.jpg" width="25" height="230" alt=""></td>
<td>
<img src="images/comments_17.jpg" width="23" height="21" alt=""></td>
<td colspan="2">
<a href="index.html"><img src="images/comments_18.jpg" alt="" width="57" height="21" border="0"></a></td>
<td colspan="6">
<img src="images/comments_19.jpg" width="52" height="21" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="21" alt=""></td>
</tr>
<tr>
<td colspan="9"><img src="images/comments_20.jpg" width="132" height="18" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="18" alt=""></td>
</tr>
<tr>
<td colspan="4">
<a href="aboutus.html"><img src="images/comments_21.jpg" alt="" width="95" height="21" border="0"></a></td>
<td colspan="5">
<img src="images/comments_22.jpg" width="37" height="21" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="21" alt=""></td>
</tr>
<tr>
<td colspan="9">
<img src="images/comments_23.jpg" width="132" height="18" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="18" alt=""></td>
</tr>
<tr>
<td colspan="5">
<a href="gallery.html"><img src="images/comments_24.jpg" alt="" width="102" height="25" border="0"></a></td>
<td colspan="4">
<img src="images/comments_25.jpg" width="30" height="25" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="25" alt=""></td>
</tr>
<tr>
<td colspan="9">
<img src="images/comments_26.jpg" width="132" height="16" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="16" alt=""></td>
</tr>
<tr>
<td colspan="5">
<a href="comments.html"><img src="images/comments_27.jpg" alt="" width="102" height="22" border="0"></a></td>
<td colspan="4">
<img src="images/comments_28.jpg" width="30" height="22" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="22" alt=""></td>
</tr>
<tr>
<td colspan="9">
<img src="images/comments_29.jpg" width="132" height="17" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="17" alt=""></td>
</tr>
<tr>
<td colspan="2">
<img src="images/comments_30.jpg" width="25" height="29" alt=""></td>
<td>
<a href="links.html"><img src="images/comments_31.jpg" alt="" width="55" height="29" border="0"></a></td>
<td colspan="6">
<img src="images/comments_32.jpg" width="52" height="29" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="29" alt=""></td>
</tr>
<tr>
<td colspan="6">
<img src="images/comments_33.jpg" width="112" height="10" alt=""></td>
<td rowspan="3">
<img src="images/comments_34.jpg" width="2" height="349" alt=""></td>
<td rowspan="3">
<img src="images/comments_35.jpg" width="17" height="349" alt=""></td>
<td rowspan="3">
<img src="images/comments_36.jpg" width="1" height="349" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="10" alt=""></td>
</tr>
<tr>
<td colspan="6">
<a href="contactus.html"><img src="images/comments_37.jpg" alt="" width="112" height="33" border="0"></a></td>
<td>
<img src="images/spacer.gif" width="1" height="33" alt=""></td>
</tr>
<tr>
<td colspan="7">
<a href="mailto:burrowsmetalworks@hotmail.com?=web inquiry"><img src="images/comments_38.jpg" alt="" width="137" height="306" border="0"></a></td>
<td>
<img src="images/spacer.gif" width="1" height="306" alt=""></td>
</tr>
<tr>
<td colspan="11" rowspan="2">
<img src="images/comments_39.jpg" width="272" height="40" alt=""></td>
<td colspan="11">
<img src="images/comments_40.jpg" width="428" height="26" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="26" alt=""></td>
</tr>
<tr>
<td>
<img src="images/comments_41.jpg" width="4" height="14" alt=""></td>
<td colspan="2">
<img src="images/comments_42.jpg" width="45" height="14" alt=""></td>
<td colspan="4">
<a href="http://www.melaniekampman.com" target"_blank"><img src="images/comments_43.jpg" alt="" width="156" height="14" border="0"></a></td>
<td colspan="4">
<img src="images/comments_44.jpg" width="223" height="14" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="14" alt=""></td>
</tr>
<tr>
<td>
<img src="images/spacer.gif" width="50" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="25" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="23" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="2" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="55" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="15" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="7" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="10" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="2" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="17" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="115" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="4" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="32" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="13" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="49" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="55" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="19" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="33" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="51" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="21" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="101" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="50" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="50" height="1" alt=""></td>
<td></td>
</tr>
</table>
</div>
<!-- End ImageReady Slices -->
</body>
</html>
|
This is my code for my php file:
Code: |
<?php
/* Subject and Email Variables */
$emailSubject = 'web inquiry';
$webMaster = 'name@something.com';
/* Gathering Data Varibles */
$emailaddressField = $_POST['emailaddress'];
$nameField = $_POST['name'];
$addressField = $_POST['address'];
$cityField = $_POST['city'];
$stateField = $_POST['state'];
$zipField = $_POST['zip'];
$phoneField = $_POST['phone'];
$newsletterField = $_POST['newsletter'];
$body = <<<EOD
<br><hr><br>
Email Address: $emailaddressField <br>
Name: $nameField <br>
Address: $addressField <br>
City: $cityField <br>
State: $stateField <br>
Zip: $zipField <br>
Phone: $phoneField <br>
Comments: $commentsField <br>
Newsletter: $newsletterField <br>
EOD;
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailsubject, $body, $headers);
/* Results rendered as HTML */
$theResults = <<<EOD
<html>
<head>
<title>Burrows Metal Works - Your email has been received.</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- ImageReady Slices (commentslanding.psd) -->
<table id="Table_01" width="801" height="801" border="0" cellpadding="0" cellspacing="0">
<tr>
<td rowspan="19">
<img src="images/your-email-has-been-recieved_01.jpg" width="50" height="800" alt=""></td>
<td colspan="15">
<img src="images/your-email-has-been-recieved_02.jpg" width="370" height="22" alt=""></td>
<td>
<a href="index.html"><img src="images/your-email-has-been-recieved_03.jpg" alt="" width="55" height="22" border="0"></a></td>
<td>
<img src="images/your-email-has-been-recieved_04.jpg" width="19" height="22" alt=""></td>
<td colspan="2">
<a href="aboutus.html"><img src="images/your-email-has-been-recieved_05.jpg" alt="" width="84" height="22" border="0"></a></td>
<td>
<img src="images/your-email-has-been-recieved_06.jpg" width="21" height="22" alt=""></td>
<td>
<a href="contactus.html"><img src="images/your-email-has-been-recieved_07.jpg" alt="" width="101" height="22" border="0"></a></td>
<td colspan="2">
<img src="images/your-email-has-been-recieved_08.jpg" width="100" height="22" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="22" alt=""></td>
</tr>
<tr>
<td colspan="13">
<img src="images/your-email-has-been-recieved_09.jpg" width="308" height="19" alt=""></td>
<td colspan="9" rowspan="2">
<img src="images/your-email-has-been-recieved_10.jpg" width="392" height="178" alt=""></td>
<td rowspan="18">
<img src="images/your-email-has-been-recieved_11.jpg" width="50" height="778" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="19" alt=""></td>
</tr>
<tr>
<td colspan="13"><img src="images/your-email-has-been-recieved_12.jpg" width="308" height="159" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="159" alt=""></td>
</tr>
<tr>
<td colspan="10" rowspan="2">
<img src="images/your-email-has-been-recieved_13.jpg" width="157" height="24" alt=""></td>
<td colspan="12">
<img src="images/your-email-has-been-recieved_14.jpg" width="543" height="12" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="12" alt=""></td>
</tr>
<tr>
<td colspan="12" rowspan="13">
<img src="images/your-email-has-been-recieved_15.jpg" width="543" height="548" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="12" alt=""></td>
</tr>
<tr>
<td rowspan="11">
<img src="images/your-email-has-been-recieved_16.jpg" width="25" height="230" alt=""></td>
<td>
<img src="images/your-email-has-been-recieved_17.jpg" width="23" height="21" alt=""></td>
<td colspan="2">
<a href="index.html"><img src="images/your-email-has-been-recieved_18.jpg" alt="" width="57" height="21" border="0"></a></td>
<td colspan="6">
<img src="images/your-email-has-been-recieved_19.jpg" width="52" height="21" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="21" alt=""></td>
</tr>
<tr>
<td colspan="9">
<img src="images/your-email-has-been-recieved_20.jpg" width="132" height="18" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="18" alt=""></td>
</tr>
<tr>
<td colspan="4">
<a href="aboutus.html"><img src="images/your-email-has-been-recieved_21.jpg" alt="" width="95" height="21" border="0"></a></td>
<td colspan="5">
<img src="images/your-email-has-been-recieved_22.jpg" width="37" height="21" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="21" alt=""></td>
</tr>
<tr>
<td colspan="9">
<img src="images/your-email-has-been-recieved_23.jpg" width="132" height="18" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="18" alt=""></td>
</tr>
<tr>
<td colspan="5">
<a href="gallery.html"><img src="images/your-email-has-been-recieved_24.jpg" alt="" width="102" height="25" border="0"></a></td>
<td colspan="4">
<img src="images/your-email-has-been-recieved_25.jpg" width="30" height="25" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="25" alt=""></td>
</tr>
<tr>
<td colspan="9">
<img src="images/your-email-has-been-recieved_26.jpg" width="132" height="16" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="16" alt=""></td>
</tr>
<tr>
<td colspan="5">
<a href="contactform.html"><img src="images/your-email-has-been-recieved_27.jpg" alt="" width="102" height="22" border="0"></a></td>
<td colspan="4">
<img src="images/your-email-has-been-recieved_28.jpg" width="30" height="22" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="22" alt=""></td>
</tr>
<tr>
<td colspan="9">
<img src="images/your-email-has-been-recieved_29.jpg" width="132" height="17" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="17" alt=""></td>
</tr>
<tr>
<td colspan="2">
<img src="images/your-email-has-been-recieved_30.jpg" width="25" height="29" alt=""></td>
<td>
<a href="links.html"><img src="images/your-email-has-been-recieved_31.jpg" alt="" width="55" height="29" border="0"></a></td>
<td colspan="6">
<img src="images/your-email-has-been-recieved_32.jpg" width="52" height="29" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="29" alt=""></td>
</tr>
<tr>
<td colspan="6">
<img src="images/your-email-has-been-recieved_33.jpg" width="112" height="10" alt=""></td>
<td rowspan="3">
<img src="images/your-email-has-been-recieved_34.jpg" width="2" height="349" alt=""></td>
<td rowspan="3">
<img src="images/your-email-has-been-recieved_35.jpg" width="17" height="349" alt=""></td>
<td rowspan="3">
<img src="images/your-email-has-been-recieved_36.jpg" width="1" height="349" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="10" alt=""></td>
</tr>
<tr>
<td colspan="6">
<a href="contactus.html"><img src="images/your-email-has-been-recieved_37.jpg" alt="" width="112" height="33" border="0"></a></td>
<td>
<img src="images/spacer.gif" width="1" height="33" alt=""></td>
</tr>
<tr>
<td colspan="7">
<img src="images/your-email-has-been-recieved_38.jpg" width="137" height="306" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="306" alt=""></td>
</tr>
<tr>
<td colspan="11" rowspan="2">
<img src="images/your-email-has-been-recieved_39.jpg" width="272" height="40" alt=""></td>
<td colspan="11">
<img src="images/your-email-has-been-recieved_40.jpg" width="428" height="26" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="26" alt=""></td>
</tr>
<tr>
<td>
<img src="images/your-email-has-been-recieved_41.jpg" width="4" height="14" alt=""></td>
<td colspan="2">
<img src="images/your-email-has-been-recieved_42.jpg" width="45" height="14" alt=""></td>
<td colspan="4">
<a href="http://www.melaniekampman.com"target"_blank"><img src="images/your-email-has-been-recieved_43.jpg" alt="" width="156" height="14" border="0"></a></td>
<td colspan="4">
<img src="images/your-email-has-been-recieved_44.jpg" width="223" height="14" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="14" alt=""></td>
</tr>
<tr>
<td>
<img src="images/spacer.gif" width="50" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="25" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="23" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="2" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="55" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="15" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="7" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="10" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="2" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="17" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="115" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="4" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="32" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="13" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="49" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="55" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="19" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="33" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="51" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="21" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="101" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="50" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="50" height="1" alt=""></td>
<td></td>
</tr>
</table>
<!-- End ImageReady Slices -->
</body>
</html>
EOD;
echo "$theResults";
?>
|
If anyone could help, I would greatly appreciate it! Thanks so much![/code]
Last edited by mkdesigns on Sat Mar 07, 2009 11:52 pm; edited 1 time in total |
|
|
|
 |
66stang66
Joined: 06 Mar 2009
Posts: 197
|
Posted: Sat Mar 07, 2009 6:22 pm Post subject: |
|
|
Not sure I could help regardless. But I think someone else might be able to if they new what kind of issue you were having. What problem are you encountering that makes you think there is a problem in the code? |
|
|
|
 |
mkdesigns
Joined: 07 Mar 2009
Posts: 9
|
Posted: Sat Mar 07, 2009 9:42 pm Post subject: |
|
|
Haha! Sorry, I forgot to state my problem. I go to test the page and it when I click submit it just goes to the .php page with no html on the page. It is just blank. I do not receive any email either. |
|
|
|
 |
66stang66
Joined: 06 Mar 2009
Posts: 197
|
Posted: Sat Mar 07, 2009 11:20 pm Post subject: |
|
|
It's been way too long since I have messed with php. Wish I could help. If I may make a suggestion though? Edit your original post and remove or edit to a bugus email address. Wouldn't want spammer bots gettin hold of it.  |
|
|
|
 |
|