This topic is locked

Email download information

11/11/2010 11:33:42 AM
PHPRunner General questions
G
glazer author

I have a page with 5 lines. On each line is the name of a zip file for downloading. At the moment I have the following code

$email="fred.com";

$from="mail@freddy.com";

$msg="Program has been downloaded by ".$_SESSION["UserID"]

;

$subject="Download Program";

$ret=runner_mail(array('to' => $email, 'subject' => $subject, 'body' => $msg, 'from'=>$from));

if(!$ret["mailed"])

echo $ret["message"];
Now this informs me that someone has downloaded a zip file but it does not tell me which one. How can I modify this so that it tells me which line the user has clicked on to download?

Sergey Kornilov admin 11/11/2010

Mike,
it depends which event you use to send this email. Please elaborate.

G
glazer author 11/11/2010



Mike,
it depends which event you use to send this email. Please elaborate.



I have it in a Program_Snippet. Using PHP5.2.

Sergey Kornilov admin 11/11/2010

What's Program_Snippet?

What page is that on?

G
glazer author 11/11/2010



What's Program_Snippet?

What page is that on?

G
glazer author 11/11/2010






It is code added on to the page that contains the lines of file names for downloading. You get it from the button marked Insert PHP Code Snippet in the Visual Editor.

Sergey Kornilov admin 11/11/2010

PHPRunner allows you to have the following pages: list, view, add, edit. There is no "page that contains the lines of file names for downloading".
Try to explain what you trying to achieve, where and provide as many details as possible.

G
glazer author 11/11/2010



PHPRunner allows you to have the following pages: list, view, add, edit. There is no "page that contains the lines of file names for downloading".
Try to explain what you trying to achieve, where and provide as many details as possible.



Let me try again. I have a table with several row with the names of zip files for downloading. The use clicks on an item on a particular row and then is able to download that file. I have added on that page the code snippet listed earlier. This has the effect that each time a user clicks on one of the items I get sent an email telling me that someone has downloaded a file. However, I dont know which of the files has been downloaded by the user, only that the user has downloaded a file. So what i would like to do is to have an email sent to me telling that the user has downloaded a particular file.