I have a simple form setup with one text area to submit an anonymouse question to our executive director. To make it simple, the old form I was using (Frontpage) used my email as the reply to so all the executive director had to do was hit reply which sent her answer to me for posting on the web.
As it is now the email comes from userid@servername.com and I am trying to change that.
This is what I attempted which isn't working, not a big PHP guy so I appreciate your help!
I tried to respond to you a couple of times but the emails got rejected.
Did you get this?
-------- Original Message --------
Subject: [phpformgen:discussion] Re: Form & Code Integration
Date: Mon, 14 Apr 2014 02:20:50 +0000
OK lets start with basics of a generated form.
The form is generated with the following most basic files:
form.html
processor.php
There may also be some of the following (some are version dependent):
style.css
monofont.ttf
CaptchaSecurityImages.php
imgs/
files/
calendar/
The form function is contained within the first two files but if you
take all the files from the generated form folder "./forms/form336862/*"
you should just be able to copy them to your site and point your browser
to the form.html files and it should work.
I see you integrated the form into your contact page but what is missing
is the form action variable is empty. In your generated form.html you
should have seen something like this:
Your contact page has this:
Try changing action="" to action="processor.php" and make sure the
processor.php file from your generated form is located in the same place
as the contact page. Another suggestion: Uniformserver is free and runs
on a Windows PC. It has a real easy web server you can start and stop
that will allow you to test your pages first before copying them to your
live site. http://www.uniformserver.com/ There are others. I just happen
to be partial to this one. The generator should be loaded so you can
generate forms but NEVER leave it on your live site after you are done.
In fact if you use Uniformserver you can run the generator locally this
way you never have the generator on your live site. On 4/13/2014 7:58
PM, Mike wrote: > > Hi TNT',while I continued my research over the
weekend, I was able to > advance the 'ball'. I have copied my new form
to my server > root/phpForms/forms/form336862/*, launched it
successfully, changed > the permissions on sub folder /forms to 777 but
receiving 'access > denied' error message after I fill in the data and
hit the submit > button... > > Any ideas/suggestions? I will also
continue to research until I hear > from you. > > Thanks > Mike > >
I have a simple form setup with one text area to submit an anonymouse
question to our executive director. To make it simple, the old form I
was using (Frontpage) used my email as the reply to so all the
executive director had to do was hit reply which sent her answer to me
for posting on the web.
As it is now the email comes from userid@servername.com and I am
trying to change that.
This is what I attempted which isn't working, not a big PHP guy so I
appreciate your help!
I have a simple form setup with one text area to submit an anonymouse
question to our executive director. To make it simple, the old form I
was using (Frontpage) used my email as the reply to so all the
executive director had to do was hit reply which sent her answer to me
for posting on the web.
As it is now the email comes from userid@servername.com and I am
trying to change that.
This is what I attempted which isn't working, not a big PHP guy so I
appreciate your help!
OK, working through the discussion page instead of email because I kept screwing it up.
Your form is an html page and your form processor is a php page. This code goes in your processor page and the variables from your form need to be inserted appropriately. If you still don't know, either post your processor here or send me a private message so we can trade external emails so we can pass attachments back and forth.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a simple form setup with one text area to submit an anonymouse question to our executive director. To make it simple, the old form I was using (Frontpage) used my email as the reply to so all the executive director had to do was hit reply which sent her answer to me for posting on the web.
As it is now the email comes from userid@servername.com and I am trying to change that.
This is what I attempted which isn't working, not a big PHP guy so I appreciate your help!
$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'])) ) {
mail("email@domain.org","Question to Cathy",$message,"From: email@domain.org","Form data:
Question: " . $_POST['field_1'] . "
");
include("cathy_thankyou.html");
}
else {
echo "Invalid Captcha String.";
}
?>
I tried to respond to you a couple of times but the emails got rejected.
Did you get this?
-------- Original Message --------
Subject: [phpformgen:discussion] Re: Form & Code Integration
Date: Mon, 14 Apr 2014 02:20:50 +0000
OK lets start with basics of a generated form.
The form is generated with the following most basic files:
form.html
processor.php
There may also be some of the following (some are version dependent):
style.css
monofont.ttf
CaptchaSecurityImages.php
imgs/
files/
calendar/
The form function is contained within the first two files but if you
take all the files from the generated form folder "./forms/form336862/*"
you should just be able to copy them to your site and point your browser
to the form.html files and it should work.
I see you integrated the form into your contact page but what is missing
is the form action variable is empty. In your generated form.html you
should have seen something like this:
Your contact page has this:
Try changing action="" to action="processor.php" and make sure the
processor.php file from your generated form is located in the same place
as the contact page. Another suggestion: Uniformserver is free and runs
on a Windows PC. It has a real easy web server you can start and stop
that will allow you to test your pages first before copying them to your
live site. http://www.uniformserver.com/ There are others. I just happen
to be partial to this one. The generator should be loaded so you can
generate forms but NEVER leave it on your live site after you are done.
In fact if you use Uniformserver you can run the generator locally this
way you never have the generator on your live site. On 4/13/2014 7:58
PM, Mike wrote: > > Hi TNT',while I continued my research over the
weekend, I was able to > advance the 'ball'. I have copied my new form
to my server > root/phpForms/forms/form336862/*, launched it
successfully, changed > the permissions on sub folder /forms to 777 but
receiving 'access > denied' error message after I fill in the data and
hit the submit > button... > > Any ideas/suggestions? I will also
continue to research until I hear > from you. > > Thanks > Mike > >
> > Form & Code Integration > > >
On 4/17/2014 12:47 PM, Mike Snyder wrote:
Follow this example:
http://php.net/manual/en/function.mail.php
$to = 'nobody@example.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@example.com' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" ;
mail($to, $subject, $message, $headers);
On 4/17/2014 12:47 PM, Mike Snyder wrote:
Thanks for the reply, I didn't see these yesterday.
I see how this would work just not sure how to use it in the PHP code generated. When I added it the form no longer works.
This line seems to be what needs to be modified or replaced:
mail("email@domain.org","Question to Cathy",$message,"From:
email@domain.org","Form data:
Not sure how to use this code in my new form however:
$to = 'nobody@example.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@example.com' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" ;
mail($to, $subject, $message, $headers);
Last edit: Mike Snyder 2014-04-18
OK, working through the discussion page instead of email because I kept screwing it up.
Your form is an html page and your form processor is a php page. This code goes in your processor page and the variables from your form need to be inserted appropriately. If you still don't know, either post your processor here or send me a private message so we can trade external emails so we can pass attachments back and forth.