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-28-2011, 05:52 PM   #1
changterhune
 
Join Date: Oct 2011
Posts: 4
Unhappy Form Results = Empty :*(

Hi! I'm new here!

I've set up a form that should upon submission of the data send me an email containing the submission. But what comes up is a blank email with the correct subject heading.

I'm using a sendresults.php file with the following code in the following page:

http://portlandpoweryoga.com/teacher...plication.html

(yes, my host does allow PHP!):

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

// Subject of email sent to you.
$subject = 'Results from TT2011 form';

// Your email address. This is where the form information will be sent.
$emailadd = 'info@portlandpoweryoga.com';

// Where to redirect after form is processed.
$url = 'http://www.portlandpoweryoga.com/confirmation.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.'">';
?>

ANy thoughts on this would be tremendously helpful. Figures I told the client it'd be done by 5 so any help before then would be great.
changterhune is offline   Reply With Quote
Old 10-28-2011, 07:08 PM   #2
changterhune
 
Join Date: Oct 2011
Posts: 4
Default

OK, I think I got it set. Reset the format of the Enctype to multipart... Seems to do the trick. I'm proud of my googlefu!!!
changterhune is offline   Reply With Quote
Old 10-29-2011, 12:37 AM   #3
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

i doubt thats the problem
__________________
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 10-29-2011, 12:47 AM   #4
changterhune
 
Join Date: Oct 2011
Posts: 4
Default

Well, it works now and it didn't before!
changterhune is offline   Reply With Quote
Old 10-29-2011, 01:08 AM   #5
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

thats great im glad. but i still doubt that was the prob. it s not important as long as it works
__________________
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
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 01:04 AM.


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