I am currently modifying the processor.php code for my form. The form data is designed to be sent to an email recipient(x@yahoo.com). When the form data is received by the recipient, the senders email address is xyz@domainhost.com. What I wish to do is change the sender/from address (i.e currently xyz@domainhost.com) to something like xyz@gmail.com. The reason why I wish to do this is that becasue when my email receives the form data by email, it is identified as spam / junk. I have posted my code and the output below.
session_start();
if( ($_SESSION['security_code']==$_POST['security_code']) && (!empty($_POST['security_code'])) ) {
// Checkbox handling
$field_5_opts = $_POST['field_5'][0];
// the value of $_POST['field_6'] is xyz@gmail.com
$email = $_POST['field_6'];
mail("x@yahoo.com","No development at Turrella Reserve","Form data:
" . $_POST['field_1'] . " " . $_POST['field_2'] . " says no to development at Turrella Reserve" . "
Email address: " . $_POST['field_3'] . "
This is what " . $_POST['field_1'] . " has to say:
" . $_POST['field_4'] . "
Check if you wish to receive updates on development progress: $field_5_opts ",$email);
Kittles Smith says no to development at Turrella Reserve
Email address: kittles@buchanan.com
This is what Kittle has to say:
fjeskfjdks
Check if you wish to receive updates on development progress: Yes
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Not recommended.
Modifying headers is a very common method of spammers. If the from domain does not match the domain that the mail server is sending from then most spam filters will reject or tag the mail as spam. You can make this change but you will likely have the same problem.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You have installed the phpFormgenerator Version 2.09 and the directory structure looks like this.
formgen
formgen/use
formgen/forms
formgen/forms/admin
formgen/forms/files
formgen/templates
After you create your first form there is a temporary copy of the files in the formgen/forms folder. These files are copied to the formgen/use/formname folder. If you named your form "myfirstform" it would be in the folder formgen/use/myfirstform. This is a permanent copy of your form that will never go away unless it is removed either by the generator or by some other means. It is always a good idea to backup your forms anyway.
New forms are generated the same way and will make new folders in the formgen/use/ folder for each new form.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks it's good to know my created form(s) will not change.
I have installed 2.08.
My directory structure is as you discribed.
However, when I open the ..../index.php page I arrive in the middle of the form building process. How can I find the first page that allows me to name the form and select the number of areas?
Thanks again,
CA
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Use both lines in your browser for the complete URL. The files can be extracted and coied to your site over the top of the previous version without affecting your current forms.
In version 2.09 the first step is the index.php file, then fields.php, process.php, process2.php, and finally process3.php. The index.php should never bring you to the middle of form creation (process.php).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I am currently modifying the processor.php code for my form. The form data is designed to be sent to an email recipient(x@yahoo.com). When the form data is received by the recipient, the senders email address is xyz@domainhost.com. What I wish to do is change the sender/from address (i.e currently xyz@domainhost.com) to something like xyz@gmail.com. The reason why I wish to do this is that becasue when my email receives the form data by email, it is identified as spam / junk. I have posted my code and the output below.
<?php
$where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/"));
session_start();
if( ($_SESSION['security_code']==$_POST['security_code']) && (!empty($_POST['security_code'])) ) {
// Checkbox handling
$field_5_opts = $_POST['field_5'][0];
// the value of $_POST['field_6'] is xyz@gmail.com
$email = $_POST['field_6'];
mail("x@yahoo.com","No development at Turrella Reserve","Form data:
" . $_POST['field_1'] . " " . $_POST['field_2'] . " says no to development at Turrella Reserve" . "
Email address: " . $_POST['field_3'] . "
This is what " . $_POST['field_1'] . " has to say:
" . $_POST['field_4'] . "
Check if you wish to receive updates on development progress: $field_5_opts ",$email);
include("confirm.html");
}
else {
echo "Invalid Captcha String.";
}
?>
----------------------------------------------------------------------------------------------
The output is:
x@gmail.com
Form data:
Kittles Smith says no to development at Turrella Reserve
Email address: kittles@buchanan.com
This is what Kittle has to say:
fjeskfjdks
Check if you wish to receive updates on development progress: Yes
Not recommended.
Modifying headers is a very common method of spammers. If the from domain does not match the domain that the mail server is sending from then most spam filters will reject or tag the mail as spam. You can make this change but you will likely have the same problem.
Hi,
You really have created a wonderful program!!
I have installed the program and created a form that works well.
Now I want to make a 2nd, 3rd....and so on.
But I don't want to lose my first form. I am worried starting at ....index.php will write over my first creation.
Where do I go to make a new form on the same site?
Thanks much,
CA
You have installed the phpFormgenerator Version 2.09 and the directory structure looks like this.
formgen
formgen/use
formgen/forms
formgen/forms/admin
formgen/forms/files
formgen/templates
After you create your first form there is a temporary copy of the files in the formgen/forms folder. These files are copied to the formgen/use/formname folder. If you named your form "myfirstform" it would be in the folder formgen/use/myfirstform. This is a permanent copy of your form that will never go away unless it is removed either by the generator or by some other means. It is always a good idea to backup your forms anyway.
New forms are generated the same way and will make new folders in the formgen/use/ folder for each new form.
Hi,
Thanks it's good to know my created form(s) will not change.
I have installed 2.08.
My directory structure is as you discribed.
However, when I open the ..../index.php page I arrive in the middle of the form building process. How can I find the first page that allows me to name the form and select the number of areas?
Thanks again,
CA
Since I have never seen or used 2.08 I can not comment on how it operates. My first suggestion would be to install version 2.09 from here.
https://sourceforge.net/project/showfiles.php?group_id=45605&package_id=122227&release_id=270273
Use both lines in your browser for the complete URL. The files can be extracted and coied to your site over the top of the previous version without affecting your current forms.
In version 2.09 the first step is the index.php file, then fields.php, process.php, process2.php, and finally process3.php. The index.php should never bring you to the middle of form creation (process.php).
Hi,
Thanks much it worked.
I uploaded the files over the old ones, changed the permissions and both the old forms and new ones work.
Thanks again,
CA