Closed Thread Icon

Topic awaiting preservation: PHP Email Forms: (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=12971" title="Pages that link to Topic awaiting preservation: PHP Email Forms: (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: PHP Email Forms: <span class="small">(Page 1 of 1)</span>\

 
neilwillis
Obsessive-Compulsive (I) Inmate

From: UK
Insane since: Nov 2003

posted posted 11-06-2003 14:32

Hi,

My first post :-)

Anyway - I am very new to the PHP world and just managed to get a script to work with no real problems However the email address given to both myself and the customer is that of my ISP !!!

Is there a way to add a line in to give me there address as a reply, and a line to give my address for then to reply to?

I hope the made sense.

Script below:

Many Thanks

Neil

<?

PRINT "<CENTER>";
PRINT "Thank you, $FullName for your interest in our product.";
PRINT "<BR><BR>";
PRINT "We will send an information pack to: $Address, today. If in the mean time you have any questions please call us on the number below ";
PRINT "<BR><BR>";
PRINT "</CENTER>";


mail("$Email", "Your request for information", "$FullName
Thank you for your interest regarding our Product!
An information pack is on its way to you.");

mail("myemail@mycompany.co.uk",
"Enquiry from $FullName.",
"$FullName requested for information about a product.
The subject was: $Subject
There comments or questions are: $Comment
The email address is: $Email
The Postal Address is:
$Address ");
?>

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 11-06-2003 15:09

neilwillis: Yep - see the manual entry for the mail() function:
http://www.php.net/manual/en/function.mail.php

Just change the details as shown here:

quote:
Example 2. Sending mail with extra headers.

<?php
mail("nobody@example.com", "the subject", $message,
"From: webmaster@{$_SERVER['SERVER_NAME']}\r\n"
."Reply-To: webmaster@{$_SERVER['SERVER_NAME']}\r\n"
."X-Mailer: PHP/" . phpversion());
?>



[edit: Oh and welcome - as you are new pop along to the Reception Room for 'induction' (link is in my sig)]

___________________
Emps

The Emperor dot org

« BackwardsOnwards »

Show Forum Drop Down Menu