PDA

View Full Version : configuration - application form


Bollifisch
03-09-2011, 04:18 PM
Hi,
I have a problem with my application form, or by sending the form. I used to configurate it with the function "mailto: name@yahoo.de configured, but the data has not be sent. I mean after you cklick to the "sent" button there will open the Yahoo account, but the information will not be sent.
What's going wrong about?
Any idees?
Thank you!
Bolli

Corrosive
03-09-2011, 04:25 PM
Welcome to the forum

You need a script to handle the processing of the form data and sending of the e-mail. Suggest php but you can also use cgi, asp etc. Try; http://www.dreamweaverclub.com/dreamweaver-php-form.php as a starting point.

Bollifisch
03-09-2011, 04:47 PM
Hey, thank you very much!!!
So I've just copied the code, I've pasted it in an empty editor, and I saved it as "sendresults.php"
I just still have some questions:
<?php
//--------------------------Set these paramaters--------------------------

SHOULD THE INFORMATIONS ABOVE REMAIN (<?php... - parameters)?

// Subject of email sent to you. <-- CAN I CANCEL THIS SENTENCE (// Subject - you.)?
$subject = 'Results from Contact form';

// Your email address. This is where the form information will be sent.
$emailadd = 'mail@rdsnetworks.net';

// Where to redirect after form is processed.
$url = 'http://www.rdsnetworks.net/confirmation.html';

// Makes all fields required. If set to '1' no field can not be empty. If set to '0' any or all fields can be empty.
$req = '0';

// --------------------------Do not edit below this line-------------------------- <-- CAN I CANCEL THIS SENTENCE?

In fact, I still don't have the URL (serverspace), so, is there any other possiblity to see how it works?

Again, thank you very much!

Corrosive
03-09-2011, 04:57 PM
why do you want to take the comments out? Comments in code are good practice cos you ain't gonna remember what or why when you go back in six months time!

If you want to test php locally you need a local testing server with php. Suggest WAMP: http://www.wampserver.com/en/ but to test mail functions you also need to follow this (freely admit this was lifted from another forum);


Setting up email in WAMP
1) Open the “php.ini“. You should know where it is located because it depends upon the particular server you’re running.


2) Search for the attribute called “SMTP” in the php.ini file.Generally you can find the line “SMTP=localhost“. change the localhost to the smtp server name of your ISP. And, there is another attribute called “smtp_port” which should be set to 25.I’ve set the following values in my php.ini file.

SMTP = smtp.wlink.com.np smtp_port = 25

3) Restart the apache server so that PHP modules and attributes will be reloaded.

4) Now try to send the mail using the mail() function ,


mail(”you@yourdomain.com”,”test subject”,”test body”);

you might get the warning like this,

Warning: mail() [function.mail]: “sendmail_from” not set in php.ini or custom “From:” header missing in C:\Program Files\xampp\htdocs\testmail.php on line 1

5) Now specify the following headers and try to send the mail again,

$headers = ‘MIME-Version: 1.0′ . “\r\n”; $headers .= ‘Content-type: text/html; charset=iso-8859-1′ . “\r\n”; $headers .= ‘From: sender@sender.com’ . “\r\n”; mail(”you@yourdomain.com”,”test subject”,”test body”,$headers);

Well that’s all, the mail is sent to “you@yourdomain.com” from the localhost.

Note : Some smtp server verifies the email address of the sender so the email address which is in the place of “sender@sender.com” should be a valid and existing email address otherwise mail might not be sent to the “you@yourdomain.com”.

Bollifisch
03-09-2011, 10:05 PM
Ok, there are some terms which I don't understand... which I have some troubles with...

why do you want to take the comments out? Comments in code are good practice cos you ain't gonna remember what or why when you go back in six months time! <--- you're right, sure, I just thought that after doing so the script maybe is not working anymore...

If you want to test php locally you need a local testing server with php. Suggest WAMP: http://www.wampserver.com/en/ but to test mail functions you also need to follow this (freely admit this was lifted from another forum); <--- Ok, I've downloaded, but when I start it, there is nothing going on, is this normal?


Setting up email in WAMP
1) Open the “php.ini“. <--- what file is it? is it the "sendresults.php"? this file is in the folder where i have all the .html sites of the homepage...
You should know where it is located because it depends upon the particular server you’re running.


2) Search for the attribute called “SMTP” in the php.ini file.Generally you can find the line “SMTP=localhost“. <---Where should I do these modifications? in Dreamweaver?
change the localhost to the smtp server name of your ISP. <--- what is ISP and where can I find it?
And, there is another attribute called “smtp_port” which should be set to 25.I’ve set the following values in my php.ini file. <--- where can I find this?

SMTP = smtp.wlink.com.np smtp_port = 25

3) Restart the apache server so that PHP modules and attributes will be reloaded.

4) Now try to send the mail using the mail() function , <---ok, and where can I write the mail function?


mail(”you@yourdomain.com”,”test subject”,”test body”);

you might get the warning like this,

Warning: mail() [function.mail]: “sendmail_from” not set in php.ini or custom “From:” header missing in C:\Program Files\xampp\htdocs\testmail.php on line 1

5) Now specify the following headers and try to send the mail again,

$headers = ‘MIME-Version: 1.0′ . “\r\n”; $headers .= ‘Content-type: text/html; charset=iso-8859-1′ . “\r\n”; $headers .= ‘From: sender@sender.com’ . “\r\n”; mail(”you@yourdomain.com”,”test subject”,”test body”,$headers);

Well that’s all, the mail is sent to “you@yourdomain.com” from the localhost.

Note : Some smtp server verifies the email address of the sender so the email address which is in the place of “sender@sender.com” should be a valid and existing email address otherwise mail might not be sent to the “you@yourdomain.com”.

Bollifisch
03-13-2011, 10:48 AM
Ok, there are some terms which I don't understand... which I have some troubles with...

why do you want to take the comments out? Comments in code are good practice cos you ain't gonna remember what or why when you go back in six months time! <--- you're right, sure, I just thought that after doing so the script maybe is not working anymore...

If you want to test php locally you need a local testing server with php. Suggest WAMP: http://www.wampserver.com/en/ but to test mail functions you also need to follow this (freely admit this was lifted from another forum); <--- Ok, I've downloaded, but when I start it, there is nothing going on, is this normal?


Setting up email in WAMP
1) Open the “php.ini“. <--- what file is it? is it the "sendresults.php"? this file is in the folder where i have all the .html sites of the homepage...
You should know where it is located because it depends upon the particular server you’re running.


2) Search for the attribute called “SMTP” in the php.ini file.Generally you can find the line “SMTP=localhost“. <---Where should I do these modifications? in Dreamweaver?
change the localhost to the smtp server name of your ISP. <--- what is ISP and where can I find it?
And, there is another attribute called “smtp_port” which should be set to 25.I’ve set the following values in my php.ini file. <--- where can I find this?

SMTP = smtp.wlink.com.np smtp_port = 25

3) Restart the apache server so that PHP modules and attributes will be reloaded.

4) Now try to send the mail using the mail() function , <---ok, and where can I write the mail function?


mail(”you@yourdomain.com”,”test subject”,”test body”);

you might get the warning like this,

Warning: mail() [function.mail]: “sendmail_from” not set in php.ini or custom “From:” header missing in C:\Program Files\xampp\htdocs\testmail.php on line 1

5) Now specify the following headers and try to send the mail again,

$headers = ‘MIME-Version: 1.0′ . “\r\n”; $headers .= ‘Content-type: text/html; charset=iso-8859-1′ . “\r\n”; $headers .= ‘From: sender@sender.com’ . “\r\n”; mail(”you@yourdomain.com”,”test subject”,”test body”,$headers);

Well that’s all, the mail is sent to “you@yourdomain.com” from the localhost.

Note : Some smtp server verifies the email address of the sender so the email address which is in the place of “sender@sender.com” should be a valid and existing email address otherwise mail might not be sent to the “you@yourdomain.com”.

Ricky55
04-10-2011, 05:43 PM
If all this is baffling you why don't you try wufoo forms.

http://wufoo.com/