Do you have a question? Post it now! No Registration Necessary. Now with pictures!
June 24, 2006, 1:49 pm
rate this thread
I just can't get an e-mail ???
<p><b class="yellow">Contact Us</b></p>
<form action="FormToEmail.php" method="post"
<input class="sidebar" value="name" name="user" >
<input class="sidebar" value="email" name="email" > <TEXTAREA
class=sidebar name=content rows=40 cols=30></TEXTAREA>
<input class="button_sidebar" value="Send" type="submit" >
<input class="button_sidebar" value="Reset" type="reset" >
My FormToEmail.php looks like this:
Enter the continue link to offer the user after the form is sent. If
you do not change this, your visitor will be given a continue link to
If you do change it, remove the "/" symbol below and replace with the
name of the page to link to, eg: "mypage.htm" or
$continue = "/";
Save this file (FormToEmail.php) and upload it together with your
webpage to your webspace. IMPORTANT - The file name is case
sensitive! You must save it exactly as it is named above! Do not put
this script in your cgi-bin directory (folder) it may not work from
THAT'S IT, FINISHED!
You do not need to make any changes below this line.
// This line prevents values being entered in a URL
if ($_SERVER['REQUEST_METHOD'] != "POST")
// Describe function to check for new lines.
// Check for disallowed characters in the Name and Email fields.
$disallowed_name = array(':',';','"','=','(',')','','@');
foreach($disallowed_name as $value)
$disallowed_email = array(':',';',"'",'"','=','(',')','');
foreach($disallowed_email as $value)
$message = "";
// This line prevents a blank form being sent, and builds the message.
foreach($_POST as $key =>
$value)$message = $message . "$key:
$message = $message . "-- \nThank you for using FormToEmail from
$message = stripslashes($message);
$subject = "FormToEmail Comments";
$headers = "From: " . $_POST['Email'] . "\n" . "Return-Path: " .
$_POST['Email'] . "\n" . "Reply-To: " . $_POST['Email'] . "\n";
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<title>Form To Email PHP script from FormToEmail.com</title>
<meta http-equiv="Content-Type" content="text/html;
<meta http-equiv="Content-Language" content="en-uk">
<body bgcolor="#ffffff" text="#000000">
<h1>Thank you <?php print stripslashes($_POST['Name']); ?>!</h1>
<h2>Your form has been sent</h2>
<h3><a href="<?php print "$continue"; ?>">Click here to
<b>FormToEmail</b> by <a
********** For some reason I just can't receive an e-mail.
Any help would be appreciated.
Re: Form Help
Yes, a few:
1) Asking where you got the script
2) Try to do a little debugging to see what's going on.
3) Find out what code is failing
4) If it's related to your host, see if this has been restricted by the host
5) Don't multipost. Crosspost instead
You're dealing with an external here - the hosting email program, as well as
host settings. It would be very hard for anyone to tell you what your problem
is from all this code.
Remove the "x" from my email address
JDS Computer Training Corp.