Jump to content

leemo

New Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by leemo

  1. As stated in the first post I am receiving all the information correctly but in separate Emails. My results are between 1-20 records, which of course is 1-20 Emails. Requinix I have changed the subject variable to make more sense if receving one Email. I need to loop the information in the $msg.= sections into one email. I have added: while ($values = mysqli_fetch_array($result)) and put the area I need looped in curly brackets, not sure if that is the correct way to do it. But, as the code stands below I am not receiving any Emails at all. $email="lee@fisteps.com"; $from="db@fisteps.com"; $msg=""; $subject="Registers Info for: ".$values["classname"]." ".$values["attendance_date"].""; while ($values = mysqli_fetch_array($result)) { $msg.= "Student: ".$values["first_name"]." ".$values["last_name"]."\r\n"; $msg.= "Absent or Present: ".$values["attendance_status"]."\r\n"; $msg.= "Class: ".$values["classname"]."\r\n"; $msg.= "Class Date: ".$values["attendance_date"]."\r\n"; $msg.= "Amount Received: ".$values["cash_received"]."\r\n"; $msg.= "Paid For: ".$values["cash_whatfor"]."\r\n"; } $ret=runner_mail(array('to' => $email, 'subject' => $subject, 'body' => $msg, 'from'=>$from)); SELECT attendance.attendance_id, attendance.student_id, attendance.class_id, attendance.attendance_status, attendance.attendance_date, attendance.cash_received, attendance.cash_whatfor, students.last_name, students.first_name, classes.classname FROM attendance INNER JOIN classes ON attendance.class_id = classes.class_id INNER JOIN students ON attendance.student_id = students.student_id ORDER BY students.last_name
  2. No Emails were sent using the previous block of code. The code is an After Record Updated event with PHP Runner software
  3. { $email="to@email.com"; $from="from@email.com"; $msg=""; $subject="Registers Info for: ".$values["classname"]." ".$values["attendance_date"].""; while ($msg = mysqli_fetch_array($result)) { $msg.= "Student: ".$values["first_name"]." ".$values["last_name"]."\r\n"; $msg.= "Absent or Present: ".$values["attendance_status"]."\r\n"; $msg.= "Class: ".$values["classname"]."\r\n"; $msg.= "Class Date: ".$values["attendance_date"]."\r\n"; $msg.= "Amount Received: ".$values["cash_received"]."\r\n"; $msg.= "Paid For: ".$values["cash_whatfor"]."\r\n"; } $ret=runner_mail(array('to' => $email, 'subject' => $subject, 'body' => $msg, 'from'=>$from)); } This isn't correct, but I'm doing my best!
  4. Thanks for your replies. I'm trying so hard as a noob to work my way around things on my own and it's a great feeling when things work. It took me 2 days to get as far as this 🙂 I've tried the magic curly brackets before and after the actual message section, do I also need to add something similar to this: while ($msg = mysqli_fetch_array($result)) - before the message section and I'm guessing I need something at the end also?
  5. The code below currently sends a separate Email with data from each row of a table when a Save All button is pressed. So, if I have 4 rows of data, 4 Email will be sent. I would prefer to receive one Email with 4 sections of data. Any help greatly appreciated. $email="to@email.com"; $from="from@email.com"; $msg=""; $subject="Registers Info for: ".$values["first_name"]." ".$values["last_name"].""; $msg.= "Student: ".$values["first_name"]." ".$values["last_name"]."\r\n"; $msg.= "Absent or Present: ".$values["attendance_status"]."\r\n"; $msg.= "Class: ".$values["classname"]."\r\n"; $msg.= "Class Date: ".$values["attendance_date"]."\r\n"; $msg.= "Amount Received: ".$values["cash_received"]."\r\n"; $msg.= "Paid For: ".$values["cash_whatfor"]."\r\n"; $ret=runner_mail(array('to' => $email, 'subject' => $subject, 'body' => $msg, 'from'=>$from)); if(!$ret["Sent"]) echo $ret["message"];
  6. I wonder if you can help me with my syntax. I'm quite new at PHP so be forgiving. This is the Javascript URL I am using to open player.php but, of course the rest is a complete mish mash at a first attempt. I 'm not sure how to send the variable within the URL <a href="javascript:popupWindow('player.php?$mp3filename=[%%GLOBAL_MidiDemoName%%]&title=[%%GLOBAL_ProductName%%]')"> <img src="%%GLOBAL_TPL_PATH%%/images/mp3demo.png" alt="MP3 Demo"></a> I have the popup window working correctly to player.php and within that URL I need to send the variables, using php echo, I believe: $mp3filename $title in this case I would like $mp3filename = %%GLOBAL_MidiDemoName%% $title = %%GLOBAL_ProductName%% Sorry about the %%fieldname%% format, but thats how the code works! I have the syntax to receive the the variables at player.php as: <?php echo $mp3filename;?> <?php echo $title;?> I'm tying myself up in knots and just need a bit of help. Thanks
  7. I've tried this, but it is not pulling the data from the [|PREFIX|]product_downloads table. This looks pretty correct to me: $query = " SELECT p.*, FLOOR(prodratingtotal/prodnumratings) AS prodavgrating, imageisthumb, imagefile, ".GetProdCustomerGroupPriceSQL()." FROM [|PREFIX|]products p LEFT JOIN [|PREFIX|]product_downloads dn ON p.productid=dn.downloadid LEFT JOIN [|PREFIX|]product_images pi ON p.productid=pi.imageprodid WHERE p.prodvisible='1' AND (imageisthumb=1 OR ISNULL(imageisthumb)) ".GetProdCustomerGroupPermissionsSQL()." ORDER BY proddateadded DESC "; Error here: $GLOBALS['DownloadName'] = isc_html_escape($row['downname']); downname being the field I require from TABLE [|PREFIX|]product_downloads
  8. Hi I need to grab some data from another table called, in this case, [|PREFIX|]product_downloads. They primary key for that table is 'downloadid'. I hope I've given enough information. Thanks in advance. $query = " SELECT p.*, FLOOR(prodratingtotal/prodnumratings) AS prodavgrating, imageisthumb, imagefile, ".GetProdCustomerGroupPriceSQL()." FROM [|PREFIX|]products p LEFT JOIN [|PREFIX|]product_images pi ON (p.productid=pi.imageprodid) WHERE p.prodvisible='1' AND (imageisthumb=1 OR ISNULL(imageisthumb)) ".GetProdCustomerGroupPermissionsSQL()." ORDER BY proddateadded DESC ";
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.