Page 3 of 3

Re: email php function repeat region not working

Posted: Wed Apr 17, 2013 5:01 am
by jonnyfortis
i added your code

Code: Select all

<?php
$orderData = array();  // define $orderData, stop notice/s about the undefined variable
$rsOrder = mysql_query($query_rsOrder, $beau) or die(mysql_error());
$row_rsOrder = mysql_fetch_assoc($rsOrder);
// add this
$orderData = $row_rsOrder;
$totalRows_rsOrder = mysql_num_rows($rsOrder);

while ($row_rsOrder = mysql_fetch_array($rsOrder)) {
echo '
<tr valign='top'>
<td class='text'>".$row_rsOrder['ProductID']."</td>
<td class='text'>".$row_rsOrder['Product'].','.$row_rsOrder['catname']."</td>
<td colspan='2' class='text'>".$row_rsOrder['UnitSize']."</td>
<td><span class='text'>".$row_rsOrder['Quantity']."</span></td>
<td align='right' class='text'>". DoFormatCurrency($row_rsOrder['UnitPrice'], 2, ',', '.', '£ ', '')."</td>
</tr>';
var_dump($orderData); // <- we want to see what is inside this to determine whether it can be used or not
?>
and got the following errors on the page

Notice: Undefined variable: orderData in E:\Domains\b\website.com\user\htdocs\admin\order-details-sent.php on line 135
Notice: Undefined variable: orderData in E:\Domains\b\website.com\user\htdocs\admin\order-details-sent.php on line 138
Notice: Undefined variable: orderData in E:\Domains\b\website.com\user\htdocs\admin\order-details-sent.php on line 155

the lines of code are

135 $rsOrder = mysql_query($query_rsOrder, $beau) or die(mysql_error());
138 $orderData = $row_rsOrder;
155 ";

on the email that is received i get the following

Price<- we want to see what is inside this to determine whether it can be used or not
?>

Re: email php function repeat region not working

Posted: Thu Apr 18, 2013 2:14 pm
by jonnyfortis
has anyone else got any ideas how i can get my email working

thanks