PDA

View Full Version : page refer through mail() ???


kab_184
08-19-2003, 11:34 AM
hi

is it possible to make a refer a page service using mail() funciton of php?
all the visitor has to enter the

To email address
subject line
message line

the url of the page shouldbe automatically added to the that mail visitor will send ..so the perosn who will recieve that email get that webpage address automaticlly..i have 100 pages on my site so if the visitor is on

www.westfire.jokes/night.asp

then he simple fills the to,subject ,message and presses submit button... the person who get the email recieves his subject,message plus the webpage address from which the mail was sent....is it possible...?what would be the code for this?

i dunt know php so need help for the complete script to do this job ...help please

bcarl314
08-19-2003, 12:22 PM
Yep, just add it to the message text.

Something like this:

$msg = $_POST['myFormVariable']."\n\n";
$msg.="URL: ".$_SERVER['PHP_SELF']; //or whatever you need to use to get the URL (ie HTTP_REFERER, QUERY_STRING etc.