View Single Post
Old Feb 7th, 2005, 7:22 PM   #3
scorpiosage
Programmer
 
scorpiosage's Avatar
 
Join Date: Aug 2004
Location: Austin, Tx
Posts: 55
Rep Power: 5 scorpiosage is on a distinguished road
Send a message via AIM to scorpiosage Send a message via Yahoo to scorpiosage
Here's some code for ya.

This should work just fine.

 
<?
$f_name = $_POST[f_name];
$l_name = $_POST[l_name];
$phone = $_POST[phone];
$email = $_POST[email];
$additional = $_POST[additional];
$message = "Name: $f_name $l_name\r\n
Phone: $phone\r\n
";
	
	$headers = "From:  $email\n"; 
	
	
	ini_set(sendmail_from, $email);
	mail('mail@yourdomain.com','subject',$message, $headers);	
?>

This is of course assuming that there is a form to fill out beforehand that uses the post method.
To help you out here the last line of code,

 
mail('mail@yourdomain.com','subject',$message, $headers);
The email address is the email address to where it is being sent, you can change this to become a variable dependant on the prior form as well. The subject can also be replaced with whatever you want it to say, or also be a variable.
I hope this helps
Mike
__________________
Here's my latest project still in the works, and I need to get rid of this &quot;frame&quot; situation for real. www.prideofaustin.com

Last edited by scorpiosage; Feb 7th, 2005 at 7:28 PM. Reason: code didn't work right
scorpiosage is offline   Reply With Quote