Hi all. I am trying to input the data from a (paypal) mysql database into a simple text email to the customer to confirm the items and quantities they have purchased. This is easy to produce in an HTML table ... but I am finding it impossible to extract the data in a form that is suitable for a simple text email. The code at present looks like this:
$myDataID = mysqlquery("SELECT paypalcartinfo.itemname, paypalcartinfo.quantity FROM paypalcartinfo WHERE paypalcart_info.txnid = '$txnid'", $connectID) or die ("Can't read the this record.";
print "
\n";
print '
Itemname
Quantity
';
while ($row = mysqlfetchrow($myDataID)) {
print '';
foreach ($row as $field) {
print ''.$field.'';
}
print "\n";
}
print '';
Your thoughts on how to overcome this problem would be greatfully received - as it's driving me bonkers! My thoughts up to now have centred around trying to turn each piece of table date (from the array) into individual variables .. but this path seems hopeless unless someone can come up with a solution. Many thanks in anticipation. Cheers.
!--removed tag-->
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).