Jump to content


Photo

PHP Mailer with a form


  • Please log in to reply
No replies to this topic

#1 crazylegseddie

crazylegseddie
  • Members
  • PipPipPip
  • Advanced Member
  • 36 posts

Posted 16 August 2006 - 07:46 PM

Hi i have created a simple contact form thats works fine using my smtp set up in my php.ini file. I now need to put my work on a live server and have downloaded and setup phpmailer. My form currently works using the following code:

<?php
	//create short variable names	
	$firstname=$_POST['firstname'];
	$lastname=$_POST['lastname'];
	$email=$_POST['email'];
	$feedback=$_POST['feedback'];
	$toaddress = 'hipbobbiter@hotmail.com';
	$subject = 'Contact';
	$mailcontent = 'Customer First Name: '.$firstname. "\n"
				   .'Customer Last Name: '.$lastname. "\n"
				   .'Customer Email: '.$email. "\n"
				   ."Customer Comments: \n".$feedback. "\n";	
	$fromaddress = 'From: admin@whitedisc.com';
	
	mail($toaddress, $subject, $mailcontent, $fromaddress);


?>

How can i integrate this into phpmailer? Ive looked at the tutorial using the site but still having problems. Any help will be cool :)

THX




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users