Newbies don't know much about jquery, please do me a favor.
I wrote a temper.html page to call the contents of the http://hys2013.sinaapp.com/SQL.php page, I follow the online example how not to AH (page does not pop windows)
Temper.html:
http://hys2013.sinaapp.com/SQL.php:
$mysql = new Saemysql ();
$conn = mysql_connect (sae_mysql_host_m. ': '). Sae_mysql_port,sae_mysql_user,sae_mysql_pass);
if ($conn) {$action = "connection succeeded"; echo "document.write ('". $action. "'); n ";}
$sql = "Select * from ' temp ' WHERE id = (SELECT MAX (CAST (id as UNSIGNED)] from temp)";//The row that gets the maximum ID
$row = $mysql->getline ($sql);
foreach ($row as $key = $value)
{
$insert _id= $value;
BREAK;//currently requires only ID so you don't have to traverse all the values
}
echo $insert _id;
Ask the great God to see how it should be changed.
------Solution--------------------
Jquery.post The second parameter is an additional parameter, and the third parameter is the callback.
$.post ("http://hys2013.sinaapp.com/SQL.php" , '', function (data) {alert ("Data Loaded:" + data);});
------Solution--------------------
Grammar
Jquery.post (url,data,success (data, Textstatus, JQXHR), DataType)
Parameter description
URL required. Specifies which URL to send the request to.
Data is optional. The map or string value. Specifies the data that is sent to the server along with the request.
Success (data, Textstatus, JQXHR) is optional. The callback function to execute when the request succeeds.
DataType
Optional. Specifies the data type of the expected server response.
The default is to perform smart judgments (XML, JSON, script, or HTML).
No after line 8th!
Change to echo $row [' id '];