Response title
This is preview!
<?php
$Host = "localhost";
$User = "root";
$Password = "";
$Base = "mydatabase";
$Link = mysql_connect($Host, $User, $Password) or die("error");
$db = mysql_select_db($Base) or die("Ha fallado la seleccion de la base de datos");
$return_arr = array();
$fetch = mysql_query("SELECT id, mydate, text FROM news");
while ($row = mysql_fetch_array($fetch, MYSQL_ASSOC)) {
$row_array['id'] = $row['id'];
$row_array['mydate'] = $row['mydate'];
$row_array['text'] = $row['text'];
array_push($return_arr,$row_array);
}
echo json_encode($return_arr);
?>
now I need to know how can I call it from jquery
© 2013 jQuery Foundation
Sponsored by and others.