[ajax-user] Problem Ajax.Request
Brought to you by:
vamp201
From: Joaquin H. <joa...@er...> - 2008-03-31 15:06:34
|
Hi there I am trying to get a value form the mysql DB. I have in the highnumber.js: var high = new Ajax.Request('highnumberdb.php'); an in the highnumberdb.php: <?php $con = mysql_connect('127.0.0.1', '****', '*****'); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("*****", $con); $sql="SELECT MAX(cloneref) FROM com_clone_list"; $result = mysql_query($sql); $row = mysql_result($result,0); mysql_close($con); echo $row; ?> And my request never goes back to var high, why? (I also tried with return $row instead of echo $row) Thanks |