niz972 wrote:niz972
Niz, just add your page url between the quotes in: $message = 'enter the message here';
You just need to devise a way to manage your URLs.
Most sites these days use $ _GET variables in the url such as: http://www.mysite.com/index.php?page=19
So for this exampe I would use:
- Code: Select all
<?php
if(isset($ _GET['page']{
page = $ _GET['page']
}
//bunch of code..
$message = ' blah blah blah, my message. Link: http://www.mysite.com/index.php?page='.$page.'';
Here's Flabbyrabbit's original flat-email code cleaned up a bit.
- Code: Select all
<?php
$to = 'to@hotmail.com'; //address email should be sent to
$subject = 'subject here'; //Subject of the email
$message = 'enter the message here'; //The message
//These extra headers allow you to set who the message is from
$headers = 'From: webmaster@example.com' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
//"From" is address that the email would have been sent from
//"Reply-To" is the address that any replies will be sent to
//This line sends your message
mail($to, $subject, $message, $headers);
?>



