The form I've created looks and works fine except there is no email with the submitted data. The information filled into the form and sent with the submit button never reaches my email. I have tried to search for help and I've tried to edit my form several times. I can not check the code for the php files because my computer says I do not have the software program to open the php file. my form is located at http://www.eleganceincharm.com/divas/frm-inq/form.html
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
PHP files are text files. Open them with NotePad or any other text editor.
Ask your web host to trace where the email went or if it was ever sent. There are literally thousands of people using the form generator, including me, without any issues.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am sure phpgenerator works great. I've read the testimonials. However I am obviously doing something wrong because mine does not work. I've looked at the forum literally all day trying to find a response that would help me to correct my own problem - and that has been unsuccessful. I am merely trying to get some help with my form which is located at http://www.eleganceincharm.com/divas/frm-inq/form.html
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The first thing you should do is create a test case for a simple mail send event. If this does not work then you will need to contact your web host to see why the test case fails.
Create a PHP file with the following contents (modified for your email address). Put this php file on your web server and point your browser at the file.
FYI, this example is right out of the http://php.net/manual/en/function.mail.php
site where you can find answers to many PHP questions. I added the echo but is essentially copied line for line from Example #2.
Hello,
I am having the same issue. Regardless of the form I create, it does not make it to the email.
I did the test email listed above and it works perfectly.
But even if I do a simple form with nothing but a name, all I get in the email is name:
Form1.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>My Form - created with phpFormGenerator</title>
</head>
<body><font size="2" face="arial"><strong>All fields marked with a * are required:<br />
<form enctype="multipart/form-data" method="post" action="process.php">
<table border="1" bordercolor="#000000">
<tbody>
<tr>
<tr></tr></tbody></table>
<table border="0" width="50%">
<tbody>
<tr>
<td bgcolor="#c0c0c0">name</td>
<td bgcolor="#c0c0c0"><input type="text" name="name" /></td></tr></tbody></table></td></tr></table><input value="Submit Form" type="submit" /> <input value="Clear Form" type="reset" /></form><br />
<br /><br />
<a href="http://phpformgen.sourceforge.net"><img alt="" border="0" src="button.jpg" /></a> </strong></font>
</body>
</html>
process.php
<?php
include("global.inc.php");
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
pt_register('POST','name');
if($errors==1) echo $error;
else{
$where_form_is="http".($HTTP_SERVER_VARS=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="name: ".$name."
";
$message = stripslashes($message);
mail("mlpaxton@hotmail.com","Form Submitted at your website",$message,"From: phpFormGenerator");
?>
<!- This is the content of the Thank you page, be careful while changing it ->
<h2>Thank you!</h2>
<table width=50%>
<tr><td>name: </td><td> <?php echo $name; ?> </td></tr>
</table>
<!- Do not change anything below this line ->
<?php
}
?>
I also have it set to display the results of the form as the thank you message
Thank you!
name:
Resulting email body:
name:
Any help would be greatly appreciated. the Host tech support has been useless. (Bluehost.com)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So the main difference in your process.php file is that the "From:" field is not properly formatted with a valid email address. Over the years many hosts and email servers are being setup to more aggreesively prevent SPAM. Try just adding a valid "From:" email address to the last field in your process.php mail() function.
You also need to see if you can locate your own site log files to see if the mail is being sent and then rejected due to this or a similar problem or if it just appears that the email is never sent.
Example:
Your process.php file:
mail("junk@junkhotmail.com","Form Submitted at your website",$message,"From: phpFormGenerator");
Change to:
mail("junk@junkhotmail.com","Form Submitted at your website",$message,$headers);
and steal the $headers variable from the previous post putting ti above the mail() function.
$headers = 'From: you@example.com' . "\r\n" .
'Reply-To: you@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
FYI, never post private information like your email address to a public forum. Please replace your private info with generic info.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Replace
pt_register('POST','name');
with
$name=$_POST;
Once you do that then there will never be a case where $errors=1 so that code becomes irrelevant. Also at that point if you are not using any other part of the "global.inc.php" then this line can also be removed.
include("global.inc.php");
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The form I've created looks and works fine except there is no email with the submitted data. The information filled into the form and sent with the submit button never reaches my email. I have tried to search for help and I've tried to edit my form several times. I can not check the code for the php files because my computer says I do not have the software program to open the php file. my form is located at http://www.eleganceincharm.com/divas/frm-inq/form.html
PHP files are text files. Open them with NotePad or any other text editor.
Ask your web host to trace where the email went or if it was ever sent. There are literally thousands of people using the form generator, including me, without any issues.
I am sure phpgenerator works great. I've read the testimonials. However I am obviously doing something wrong because mine does not work. I've looked at the forum literally all day trying to find a response that would help me to correct my own problem - and that has been unsuccessful. I am merely trying to get some help with my form which is located at http://www.eleganceincharm.com/divas/frm-inq/form.html
The first thing you should do is create a test case for a simple mail send event. If this does not work then you will need to contact your web host to see why the test case fails.
Create a PHP file with the following contents (modified for your email address). Put this php file on your web server and point your browser at the file.
<?php
$to = 'you@example.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: you@example.com' . "\r\n" .
'Reply-To: you@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
echo "<li>Mail message has been sent!";
?>
FYI, this example is right out of the
http://php.net/manual/en/function.mail.php
site where you can find answers to many PHP questions. I added the echo but is essentially copied line for line from Example #2.
Example URL assuming you named the file "mailme.php"
http://yourwebsite.com/mailme.php
Hello,
I am having the same issue. Regardless of the form I create, it does not make it to the email.
I did the test email listed above and it works perfectly.
But even if I do a simple form with nothing but a name, all I get in the email is name:
Form1.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>My Form - created with phpFormGenerator</title>
</head>
<body><font size="2" face="arial"><strong>All fields marked with a * are required:<br />
<form enctype="multipart/form-data" method="post" action="process.php">
<table border="1" bordercolor="#000000">
<tbody>
<tr>
<tr></tr></tbody></table>
<table border="0" width="50%">
<tbody>
<tr>
<td bgcolor="#c0c0c0">name</td>
<td bgcolor="#c0c0c0"><input type="text" name="name" /></td></tr></tbody></table></td></tr></table><input value="Submit Form" type="submit" /> <input value="Clear Form" type="reset" /></form><br />
<br /><br />
<a href="http://phpformgen.sourceforge.net"><img alt="" border="0" src="button.jpg" /></a> </strong></font>
</body>
</html>
process.php
<?php
include("global.inc.php");
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
pt_register('POST','name');
if($errors==1) echo $error;
else{
$where_form_is="http".($HTTP_SERVER_VARS=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="name: ".$name."
";
$message = stripslashes($message);
mail("mlpaxton@hotmail.com","Form Submitted at your website",$message,"From: phpFormGenerator");
?>
<!- This is the content of the Thank you page, be careful while changing it ->
<h2>Thank you!</h2>
<table width=50%>
<tr><td>name: </td><td> <?php echo $name; ?> </td></tr>
</table>
<!- Do not change anything below this line ->
<?php
}
?>
I also have it set to display the results of the form as the thank you message
Thank you!
name:
Resulting email body:
name:
Any help would be greatly appreciated. the Host tech support has been useless. (Bluehost.com)
So the main difference in your process.php file is that the "From:" field is not properly formatted with a valid email address. Over the years many hosts and email servers are being setup to more aggreesively prevent SPAM. Try just adding a valid "From:" email address to the last field in your process.php mail() function.
You also need to see if you can locate your own site log files to see if the mail is being sent and then rejected due to this or a similar problem or if it just appears that the email is never sent.
Example:
Your process.php file:
mail("junk@junkhotmail.com","Form Submitted at your website",$message,"From: phpFormGenerator");
Change to:
mail("junk@junkhotmail.com","Form Submitted at your website",$message,$headers);
and steal the $headers variable from the previous post putting ti above the mail() function.
$headers = 'From: you@example.com' . "\r\n" .
'Reply-To: you@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
FYI, never post private information like your email address to a public forum. Please replace your private info with generic info.
Also remove this line:
$where_form_is="http".($HTTP_SERVER_VARS=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
It is not useful and does sometimes cause unexpected results.
For the $name vaiable
Replace
pt_register('POST','name');
with
$name=$_POST;
Once you do that then there will never be a case where $errors=1 so that code becomes irrelevant. Also at that point if you are not using any other part of the "global.inc.php" then this line can also be removed.
include("global.inc.php");