I have an HTML order form with approx 100 possible entries. The form posts to a PHP file. The PHP file send an email with the order quantities and $totals per item.
The problem is that it sends the info when the quantity = 0 – which, of course, makes the resulting email quite cumbersome.
SO, my question is: How do I NOT send the info when the quantity is 0
Here is an example of the coding I have for the POST portion:
if( !empty($_POST[""]) )
else
{
$qtyG01lg = 0;
$totalG01lg = 0;
}
And here is the part I do NOT want to send if the quantity is “0”:
$body .= " G01-large: (" . $qtyG01lg . " @ $10.00ea) = " . $totalG01lg . "\n";
The lines for checking if the quantity is 0 set should be,
Also, you cannot have an empty string as the name/key in $_POST (
if( !empty($_POST[""]) )). So, the line should be,