As a newbie at 63, I have learned how to build an SQL database from scratch, interrogate it and present results, but I just cannot wrap my bhead around the following issue.
I am in the process of constructing a site that will return a list of suppliers to a particular postcode (zipcode). That bit works. However I want to add a checkmark to each record so that a customer can select which supplier provides a quote to the customer.
The values or checked records on "submit" will carry an email variable (presumably hidden) forward to a customer form which when submitted will email each supplier selected,reply to the customer.and store the details in the customer database.
The list can vary in length depending on the postcode searched. The email variable is "supplier_email" and each record has a "supplier_id" which is the primary index.
Any help would be much appreciated.
<?PHP
// create the query
$result = mysql_query("SELECT * FROM `suppliers` WHERE `supplier_active` = '1' and `supplier_deliverypostcode` LIKE '%$term%' ORDER BY `supplier_name` ASC limit 0,16");
//return the array and loop through each roww
while ($row=mysql_fetch_assoc($result)) {
$ID = $row['supplier_id'];
$logo = $row['supplier_logopix'];
$Supplier = $row['supplier_name'];
$Phone = $row['supplier_phone1'];
$Price = $row['supplier_todaysprice1'];
// concatenate to create html table row
$tr.= "<tr><td valign=middle><img src='/graphics/".$logo. "'></td>".
"<td valign=left>". $Supplier. "</td>".
"<td valign=middle>". $Phone. "</td>".
"<td valign=middle>". $Price. " ppl</td></tr>";
}
?>
<table width="650" border=0 align="right" cellpadding=0 cellspacing=0 style="height: 30px; font-size: 13px; font-family: Arial, Verdana, 'Xpress SF';font-weight: normal; width: 650px; background-color: #FFF;">
<tr>
<th width="130" align="left" valign="middle" style="text-align: middle; color: #333; ;"> Logo</th>
<th width="230" align="left" valign="middle" style="text-align: middle; color: #333;"> Supplier</th>
<th width="135" align="left" valign="middle" style="text-align: middle; color: #333;"> Phone</th>
<th width="155" align="left" valign="middle" style="text-align: middle; color: #333;"> Current Price</th>
</tr>
<?=$tr?>
</table>
</div>