View Single Post
  #1 (permalink)  
Old 09-26-2007, 11:27 PM
S.Vinothkumar S.Vinothkumar is offline
D-Web Genius
 
Join Date: May 2007
Posts: 1,061
S.Vinothkumar is on a distinguished road
Question How can I return two values to a form?

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!
Reply With Quote
Sponsored Links