Result Table Into EMail
| From: | Don Smith | Date: | Thu, 15 Jun 2000 01:50:56 +0000 |
| Subject: | Result Table Into EMail | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-1900@lists.php.net to get a copy of this message | ||
I'm stuck here...
I have a site where a user logs in and a query results are printed to a web
page table listing their product order. This list could consist of dozens of
lines, each with an input field so that the user can list the quantity of
each product they are ordering. So far so good. Now, I want to get that
information into an email, but a fixed array won't work because the number
of rows in a given result will vary. Here's the breakout of each row that's
printed to the web page at http://www.dallasbureau.com:
echo "<TR><TD>$custid</TD><TD>$item</TD><TD>$des</TD>
<TD>$uom1</TD><TD>$price1</TD><TD>";
echo "<input type=\"text\" value=\"0\" name=\"qty\"
size=\"3\">";
echo "</TD><TR>\n";
Now, I need to put each line in an email message along with the quantity the
user has typed in. I certainly know how to user the variable $qty in the
mail() function, but here I need an array I would think since this line will
be repeated a hundred times or so listing the products the user can choose
from, but I can't figure out how to create the array and then display the
array in the email message when the rows can be of a variable number. to add
to the complexity, each variable needs to be seperated by a tab character.
The merchant will then copy/past the tab-delimited message into a
spreadsheet.
Any help would be greatly appreciated.
Don Smith
NewsVideo.com