php scripting problems buttons and colours?

  • Thread starter Thread starter Mr E
  • Start date Start date
M

Mr E

Guest
i have some code it displays loads of data, including a price breakdown of prices from a mysql database

what i would like is a button to display in the table under all the prices and image so you can buy that door.

the button would have to add the selected door detail's that its under to go into a shopping basket and take you to the shopping basket page.

also i would like to show the prices themselves in a different colour from the rest of the text to stand out.


i do not know how to do either of these in the php code, does anyone have any ideas?

this is my current code (all fully functioning)

<?php

$con = mysql_connect("localhost", "root", "")|| die;
mysql_select_db("protechpricer");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}


// some code

// gathers the door name the final price and the thumbnail for all doors that have Arbury in their name
$sql = mysql_query("SELECT DoorName, Thumbimage,OurListPrice,ListPrice50Percdisc, VAT, InternetDiscount10Perc FROM tblpricelist WHERE DoorName like '%Kenilworth%'");

$cln = 0;
echo ("<table>");
echo ("<tr>");
while ($row = mysql_fetch_array($sql))
{
echo ("<th align=\"center\">");

$id = $row['DoorName'];

echo" <img src='./thumb/". $row['Thumbimage']."' onmousedown=\"this.src='./large/". $row['Thumbimage']."'\" onmouseup=\"this.src='./thumb/". $row['Thumbimage']."'\"/><br />";
echo $row['DoorName']."<br/>";
echo "full price: £". $row['OurListPrice']."<br/>";
echo "50% discount: £". $row['ListPrice50Percdisc']."<br/>";
echo "We pay the VAT: £". $row['VAT']."<br/>";
echo "and with our online discount you will pay: £".$row['InternetDiscount10Perc']."<br/>";
echo ("<img src=\"button.php?$enc_text\" border=0 Alt=\"$text\">");
echo "</th>";


$cln++;
if ($cln == 4)
{
$cln = 0;
echo ("</tr>\n<tr>");
}
}


echo ("</tr>");
echo ("</table>");
?>
 
Back
Top