fiorano Posted August 4, 2008 Share Posted August 4, 2008 Hi, I have a simple mail form : FORM method=post action="mailer.php"> <p>Email: <INPUT name="email" type="text"> </p> <p><br> Message:<br> <TEXTAREA name="message"> </textarea> <br> <input type=submit> </p> </FORM> I then have the following PHP scrip to send the form details : <?php mail("[email protected]", "Web Enquiry", $_REQUEST[message], "From: $_REQUEST", "-f".$_REQUEST); header( "Location: ); ?> It works fine - but Ive tried adding a 'Name' and 'Phone' field to the form but end up messing up the php script! The site is on a LINUX server if thats any help. Both the form.html and script are in the HTDOCS directory. I got this script from my hosting company with this statement : In order for the script to work, you need to specify, via a fifth -f parameter, the domain from which the mail is being sent([email protected]). The PHP component uses SMTP (Simple Mail Transfer Protocol), and all StreamlineNet SMTP servers have filters which ensure that the data returned by either the first or fifth mail parameter relates to one of your domains hosted by StreamlineNet. The final part of the script thanks the visitor for the message. This is done by sending an HTTP header back to the visitor's browser telling it to load a file called thankyou.html from your domain. The /header/function allows you to send any HTTP header back to the browser. Ta! Fiorano Link to comment https://forums.phpfreaks.com/topic/118141-simple-mail-form-error-linux-server/ Share on other sites More sharing options...
ratcateme Posted August 4, 2008 Share Posted August 4, 2008 can you post the code from when you added these extra fields? how did they mess up your php? Scott. Link to comment https://forums.phpfreaks.com/topic/118141-simple-mail-form-error-linux-server/#findComment-607826 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.