View Single Post
  #1 (permalink)  
Old 08-04-2008, 08:03 PM
disbrowpr disbrowpr is offline
Novice
Join Date: Aug 2008
Location: Rolla, Mo
Posts: 14
iTrader: (0)
disbrowpr is on a distinguished road
Icon11 PHP Form to E-mail

Hello All,

First post here! =D Was wondering about a few things. Hopefully you guys can help me! Having an issue.

So I have an online application for people to fill out, and when they click submit its suppose to send the application to our e-mails. There is the issue. I get the e-mails but I dont get the application.

Here is a link to the application on our site,

DPR Application

Here is the PHP im using...

PHP Code:
<?php
//--------------------------Set these paramaters--------------------------

// Subject of email sent to you.
$subject 'Submitted Applicant';

// Your email address. This is where the form information will be sent.
$emailadd '**edited-out email addresses**';

// Where to redirect after form is processed.
$url 'http://www.disbrowpr.org/thankyou.htm';

// 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:";
$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.'">';
?>
Now the form was created in Dreamweaver CS3. So im hoping that you guys can help me out. Am I doing something wrong, Is there something wrong with my PHP, if so, could you really help me out. Kind of desperate on this one, because we have about 20 people wanting to apply and I can't figure this out. Also I have searched the internet for about a week and couldn't find anything, and im not that great with PHP yet. If possible also, could someone fill in the blanks for me? lol!

Thanks ,
Micah
Disbrow Paranormal Research
Web Development Team Leader

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!

Last edited by TeraTask : 08-04-2008 at 08:55 PM. Reason: edited-out email addresses
Reply With Quote