Form Help

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Here is my form that I''m having problems with.

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:



$my_email ="";


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
your homepage:

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 = "/";


Step 3:

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


You do not need to make any changes below this line.


// This line prevents values being entered in a URL


// Describe function to check for new lines.

function new_line_check($a)




// 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:
$value\n\n";} if($set!==1){header("location:

$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</title>

<meta http-equiv="Content-Type" content="text/html;
<meta http-equiv="Content-Language" content="en-uk">


<body bgcolor="#ffffff" text="#000000">

<font face="arial">

<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
href=" "></a>



********** For some reason I just can't receive an e-mail.  

Any help would be appreciated.


- hoopster

Re: Form Help

Hoopster wrote:
Quoted text here. Click to load it
<snip code>
Quoted text here. Click to load it

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
Jerry Stuckle
JDS Computer Training Corp.

Site Timeline