Hi all,
I need to return two values of an image's name and price. Here the below is my coding...clear me from my coding....
dbselect Code Code:
<?php
$q=$_GET["q"];
include "con.php";
$sql="SELECT imgname,price FROM product WHERE no = '".$q."'";
$result = mysql_query($sql);
$row=mysql_fetch_row($result);
$imgpath=$row[0];
echo "<img width='120px' src=$imgpath>";
//Here I need to return the Price field to the parent page
mysql_close($dbh);
?>
JS code Code:
function stateChanged()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
document.getElementById("layer1").innerHTML=xmlHttp.responseText //shows image correctly here.
}
}
In HTML code the text box's name is txtprice
thanking you in advance..
__________________
S.VinothkumaR
Behind me is infinite power,
Before me is Endless Possibility,
Around me is Boundless Opportunity,
Why should I fear!