<?php
print "<td><a href=q.php?pcode=$pcode><img height=200 src=image/$pcode.jpg </a></td>";
?>
This is what I have written on my php page, once I click the image a prompt box will appear asking me for the quantity that I want the product, which is represented through the image.
<script type="text/javascript">
function typequantity ()
{
q=prompt("Quantity?","");
if (q!=0 && q!="" && q!=null )
{
window.location.href = "http://localhost/buy.php?q="+q;
}
else
{
window.location.href = "http://localhost/buy.php";
}
}
</script>
<body onload="typequantity()">
</body>
However, the quantity does sends back, but the pcode is lost, and I need both of them.