|  | Posted by Pedro Graca on 11/10/06 19:17 
matt wrote:> I have used some free code for listing files for download, but I want to
 > send an email to the administrator when the file has been downloaded. I
 > have got some code in here that does it, but it will not print in the
 > username or email amddress of the person doing the download - which I am
 > collecting from a form on the previous page. I can get the name and
 > email address to print out normally, just not into the email sending
 > body. I have attached code below:
 
 Whooooaa!
 <snip unread code>
 
 Let's say you "print out normally the name and email address" with
 
 echo $name;
 echo $email_address;
 
 Then, in the mail body, just add those variables;
 Where you have (maybe????)
 
 mail($to, $sub, $body, $xtra);
 
 replace with
 
 mail($to, $sub, $body . "\n\n$name $email_address", $xtra);
 
 Voila!
 --
 I (almost) never check the dodgeit address.
 If you *really* need to mail me, use the address in the Reply-To
 header with a message in *plain* *text* *without* *attachments*.
 [Back to original message] |