logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > PHP
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 10-31-2011, 10:56 PM   #1
kidztar
 
Join Date: Oct 2011
Posts: 2
Default PHP form help PLEASE

Can anyone tell me what is wrong with this script? The form will email me, however it only shows this
name:
email:
Ship:
and so on, the information the client fills out does not get sent to my email

<?php

/* Subject and Email Variables */

$emailSubject = 'Orders from website!';
$Kidztar = 'kidztar@yahoo.com';

/* Gathering Data Variables */

$nameField = $_POST['name'];
$phoneField = $_POST['phone'];
$emailField = $_POST['email'];
$shipField = $_POST['ship'];
$childField = $_POST['child'];
$certnameField = $_POST['certname'];
$certphotoField = $_POST['certphoto'];
$friendField = $_POST['friend'];
$uploadField = $_POST['upload'];

$body = <<<EOD
<br><hr><br>
Name: $name <br>
Phone: $phone <br>
Email: $email <br>
Ship: $ship <br>
Child: $child <br>
Certname: $certname <br>
Certphoto: $certphoto <br>
Friend: $friend <br>
Photo: $upload <br>
EOD;

$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($Kidztar, $emailSubject, $body, $headers);

/* Results rendered as HTML */

$theResults = <<<EOD
<html>
<head>
<title>colorback</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body bgcolor="#FFFFFF">
<!-- ImageReady Slices (colorback.psd) -->
<table id="Table_01" width="800" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="7">
<img id="thankyou_01" src="images/thankyou_01.png" width="800" height="73" alt="" /></td>
</tr>
<tr>
<td>
<img id="thankyou_02" src="images/thankyou_02.jpg" width="85" height="55" alt="" /></td>
<td>
<img id="thankyou_03" src="images/thankyou_03.jpg" width="89" height="55" alt="" /></td>
<td>
<img id="thankyou_04" src="images/thankyou_04.jpg" width="89" height="55" alt="" /></td>
<td>
<img id="thankyou_05" src="images/thankyou_05.jpg" width="90" height="55" alt="" /></td>
<td>
<img id="thankyou_06" src="images/thankyou_06.jpg" width="123" height="55" alt="" /></td>
<td>
<img id="thankyou_07" src="images/thankyou_07.jpg" width="169" height="55" alt="" /></td>
<td>
<img id="thankyou_08" src="images/thankyou_08.jpg" width="155" height="55" alt="" /></td>
</tr>
<tr>
<td colspan="7">
<img id="thankyou_09" src="images/thankyou_09.png" width="800" height="449" alt="" /></td>
</tr>
<tr>
<td colspan="7">
<img id="thankyou_10" src="images/thankyou_10.png" width="800" height="23" alt="" /></td>
</tr>
</table>
<!-- End ImageReady Slices -->
</body>
</html>
EOD;
echo "$theResults";

?>
kidztar is offline   Reply With Quote
Old 11-02-2011, 01:17 AM   #2
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,162
Default

You variable names dont match
Code:
$nameField = $_POST['name'];
$phoneField = $_POST['phone'];
$emailField = $_POST['email'];
$shipField = $_POST['ship'];
$childField = $_POST['child'];
$certnameField = $_POST['certname'];
$certphotoField = $_POST['certphoto'];
$friendField = $_POST['friend'];
$uploadField = $_POST['upload'];
whiloe your mesage looks for Name: $name <br> for example

it should read
Code:
$nameField = $_POST['name'];
$phone= $_POST['phone'];
$email= $_POST['email'];
$ship= $_POST['ship'];
$child = $_POST['child'];
$certname= $_POST['certname'];
$certphoto= $_POST['certphoto'];
$friend= $_POST['friend'];
$upload= $_POST['upload'];
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 11-02-2011, 01:56 AM   #3
kidztar
 
Join Date: Oct 2011
Posts: 2
Default

Sir edbr
You are a genius! Thank so much, I just had to take out Field. Now if I can just figure out how to get the file upload to post when uploaded I am set.

Anyone know of a Thread on here to help me with that issue?
Thanks
Kidztar
kidztar is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:12 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com