logo-dw

Go Back   Dreamweaver Club Forums > Graphic Design > Web Design
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 08-20-2007, 10:54 PM   #1
Gail Marie
 
Join Date: Aug 2007
Posts: 2
Default Please help with my form results page

If anyone can help me with my form retults page! My form lets users register and submit there form information to mysql database and then it sends an email to me. The database part is working great, but the email is not. When i receive the emailed form there is no form field information included in the email:
Example:

New Registration
gtrace@shaw.ca
To: gtrace@shaw.ca

Results form form:

None of the form information is included in the email?

Here is my Code:

I added a call javascrit action to my submit button as follows:

Form Name="schoolregistration"method="post"action="http ://www.peiregistration.portraiteventimaging.ca/Sendresults.php">

Here is my Sendresults.php file:

<!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>Untitled Document</title>
</head>

<body><?php
//--------------------------Set these paramaters--------------------------

// Subject of email sent to you.
$subject = 'New Regisration';

// Your email address. This is where the form information will be sent.
$emailadd = 'gtrace@shaw.ca';

// Where to redirect after form is processed.
$url = 'http://www.peiregistration.portraiteventimaging.ca/Registration Confirmation Page.html';

// Makes all fields required. If set to '1' no field can not be empty. If set to '0' any or all fields can be empty.
$req = '0';

// --------------------------Do not edit below this line--------------------------
$text = "Results from form:\n\n";
$space = ' ';
$line = '
';
foreach ($_POST as $key => $value)
{
if ($req == '1')
{
if ($value == '')
{echo "$key is empty";die;}
}
$j = strlen($key);
if ($j >= 20)
{echo "Name of form element $key cannot be longer than 20 characters";die;}
$j = 20 - $j;
for ($i = 1; $i <= $j; $i++)
{$space .= ' ';}
$value = str_replace('\n', "$line", $value);
$conc = "{$key}:$space{$value}$line";
$text .= $conc;
$space = ' ';
}
mail($emailadd, $subject, $text, 'From: '.$emailadd.'');
echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';
?>
Gail Marie is offline   Reply With Quote
Old 08-21-2007, 03:46 AM   #2
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

what are the name of the form fields.post the for code
__________________
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 online now   Reply With Quote
Old 08-21-2007, 03:47 PM   #3
Gail Marie
 
Join Date: Aug 2007
Posts: 2
Default Form Results Page

Here is my code for the form fields:

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "schoolregistration")) {
$insertSQL = sprintf("INSERT INTO table1 (address, city, prov, postal, phonenumber, email, schoolgroup, username, password, `date`, parentgardian, Childa, Childb, Childc, Childd, Childe, Childf, Childg, Childh, Gradea, Gradeb, Gradec, Graded, Gradee, Gradef, Gradeg, Gradeh, Accept, Relation) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['Address'], "text"),
GetSQLValueString($_POST['City'], "text"),
GetSQLValueString($_POST['Prov'], "text"),
GetSQLValueString($_POST['Postal'], "text"),
GetSQLValueString($_POST['Phonenumber'], "text"),
GetSQLValueString($_POST['Email'], "text"),
GetSQLValueString($_POST['schoolgroup'], "text"),
GetSQLValueString($_POST['Username'], "text"),
GetSQLValueString($_POST['Password'], "text"),
GetSQLValueString($_POST['Date'], "date"),
GetSQLValueString($_POST['parentgardian'], "text"),
GetSQLValueString($_POST['Childa'], "text"),
GetSQLValueString($_POST['Childb'], "text"),
GetSQLValueString($_POST['Childc'], "text"),
GetSQLValueString($_POST['Childd'], "text"),
GetSQLValueString($_POST['Childe'], "text"),
GetSQLValueString($_POST['Childf'], "text"),
GetSQLValueString($_POST['Childg'], "text"),
GetSQLValueString($_POST['Childh'], "text"),
GetSQLValueString($_POST['Gradea'], "text"),
GetSQLValueString($_POST['Gradeb'], "text"),
GetSQLValueString($_POST['Gradec'], "text"),
GetSQLValueString($_POST['Graded'], "text"),
GetSQLValueString($_POST['Gradee'], "text"),
GetSQLValueString($_POST['Gradef'], "text"),
GetSQLValueString($_POST['Gradeg'], "text"),
GetSQLValueString($_POST['Gradeh'], "text"),
GetSQLValueString($_POST['Accept'], "text"),
GetSQLValueString($_POST['Relation'], "text"));
Gail Marie 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:43 AM.


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