View Full Version : Form Results = Empty :*(

10-28-2011, 05:52 PM
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:


(yes, my host does allow 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.

10-28-2011, 07:08 PM
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!!! :)

10-29-2011, 12:37 AM
i doubt thats the problem

10-29-2011, 12:47 AM
Well, it works now and it didn't before! :-D

10-29-2011, 01:08 AM
thats great im glad. but i still doubt that was the prob. it s not important as long as it works