PHP HTML hidden fields and posting images?

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

Mr E

Guest
i'm trying to post images across from my webpage, in a hidden field to the next page when it has been 'ordered'.

however my mysql database does not hold the image itself just the name of the image and the script does the rest.

how do i go about this?


this is my code for the page

<div id="MainContent">
<div id="doors">
<?php

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



// 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,ListPrice50Percd... VAT, InternetDiscount10Perc FROM tblpricelist WHERE DoorName like '%Arbury%'");

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

$id = $row['DoorName'];
echo '<form action="basket.php" method="post">';
echo " <img src='./thumb/". $row['Thumbimage']."' onclick=\"this.src='./large/". $row['Thumbimage']."'\" ondblclick=\"this.src='./thumb/". $row['Thumbimage']."'\"/>
";
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 "Quantity:";
echo "<input type='hidden' name='DoorName' value='".$row['DoorName']."'>";
echo "<input type='hidden' name='price' value='".$row['InternetDiscount10Perc']....
echo "<INPUT type='text' name='Quantity' value='1' size=2 maxlength=2>";
echo "<input type='submit' id='Submitfrm' value='order now' />";
echo "</form>";


echo "</th>";

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


echo ("</tr>");
echo ("</table>");

?>
</div>
 
Back
Top