Jump to content


Photo

simple question


  • Please log in to reply
2 replies to this topic

#1 spires

spires
  • Members
  • PipPipPip
  • Advanced Member
  • 492 posts

Posted 18 August 2006 - 08:22 PM

hi
How to make over $600 a day from AdSense? Discover EXACTLY how he does it in these videos:
http://www.adsense-online.com

#2 corbin

corbin
  • Staff Alumni
  • Advanced Member
  • 8,129 posts

Posted 18 August 2006 - 08:30 PM

http://us2.php.net/reserved.variables

You should be able to figured it out from that.
Why doesn't anyone ever say hi, hey, or whad up world?

#3 Woolf

Woolf
  • Members
  • PipPipPip
  • Advanced Member
  • 41 posts

Posted 18 August 2006 - 08:39 PM

In order to send HTML code (that means <a href=... links) in an e-mail, you must let the script know that your message contains html. In theory, this should work:

$link = '<a href="nickyrubin.com/members">login</a>';
		$to      = 	$buyer_email;
		$subject = 	'Hi '.$firstname.', Nicky Rubin Would like to thank you';
		$message = 	'Hi '.$firstname.'
						Thank you for buying from nickyrubin.com
						Here is you username and password
						USERNAME = '.$buyer_email.'
						PASSWORD = '.$password.'
						Please login here'.$link.'';
		$headers  = 'MIME-Version: 1.0' . "\r\n";
		$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

		mail($to, $subject, $message, $headers);
   		$enter = '<div class="error">An email has been sent containing your username and password.</div>';

What is in the $headers variable lets the script know it should be formatted as HTML. Please note, however, that means that you must format the rest of your message in HTML. For example, you cannot just format a new line by using a return, you must use < br > (without the spaces) instead.

e.g.

$link = '<a href="nickyrubin.com/members">login</a>';
		$to      = 	$buyer_email;
		$subject = 	'Hi '.$firstname.', Nicky Rubin Would like to thank you';
		$message = 	'Hi '.$firstname.'<br>
						Thank you for buying from nickyrubin.com<br>
						Here is you username and password<br>
						USERNAME = '.$buyer_email.'<br>
						PASSWORD = '.$password.'<br>
						Please login here'.$link.'';<br>
		$headers  = 'MIME-Version: 1.0' . "\r\n";
		$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

		mail($to, $subject, $message, $headers);
   		$enter = '<div class="error">An email has been sent containing your username and password.</div>';





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users