Jump to content

splinter_1234

Members
  • Posts

    4
  • Joined

  • Last visited

splinter_1234's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks very much guys, i'll give it a go and report back!
  2. Thanks for your reply, unfortunately after spending a few hours looking, I am struggling
  3. I have pretty basic PHP knowledge. I have set up a contact form which works well, however I seem to be receiving blank emails. I used dreamweaver to perform validation on the submit button so I don't understand how this is happening. Any help would be much appreciated. form.html code - <form id="form1" name="form1" method="post" action="mailer.php"> <label>Name: </label> <input name="Name" type="text" id="name" size="20" /> <label>Phone: </label> <input name="Phone" type="text" id="phone" size="20" /> <label>Best time to call: </label> <input name="Time" type="text" id="time" size="20" /> <input name="submit" type="submit" id="submit" onclick="MM_validateForm('name','','R','phone','','R','time','','R');return document.MM_returnValue" value="Submit" /> </form> mailer.php code - <?php // get posted data into local variables $EmailFrom = ""; $EmailTo = ""; $Subject = ""; $Name = Trim(stripslashes($_POST['Name'])); $Phone = Trim(stripslashes($_POST['Phone'])); $Time = Trim(stripslashes($_POST['Time'])); // prepare email body text $Body = ""; $Body .= "Name: "; $Body .= $Name; $Body .= "\n"; $Body .= "Phone: "; $Body .= $Phone; $Body .= "\n"; $Body .= "Time: "; $Body .= $Time; $Body .= "\n"; // send email $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>"); // redirect to success page if ($success){ print "<meta http-equiv=\"refresh\" content=\"0;URL=thank_you.html\">"; } else{ print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">"; } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.