Vous êtes sur la page 1sur 1

Good day sir!

Based on your video demo, i did this code:


function autoLoanContent(title,index){
var row = $('#dg_application_ci').datagrid('getSelected');
if (row){
if(index==0){
url =
window.location.href+'modules/data/get_personal_info.php?id='+row.maker_id;
// $('#p1').panel('refresh', url);
$('#fm_investigate_maker').form('load',url);
}
}
}
instead of using panel.refresh,url I used the form(load,url)
i am expecting that the form textboxes will ba updated, but i failed

the url variable has this code:

<?php
//open connection to mysql db
$hostname = 'localhost';
$username = 'root';
$password = '';
$dbname = 'dbloanmanagerv3';

$conn = @mysql_connect($hostname,$username,$password);
if (!$conn) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db($dbname, $conn);

//fetch table rows from mysql db

//filter
$id = intval($_REQUEST['id']);
//$id = 359;
$where = "contact_id=$id";

$sql = "select * from tbl_contacts where ".$where;


$rs = mysql_query($sql);

//create an array
$items = array();
while($row = mysql_fetch_object($rs)){
//array_push($items, $row);
$items[] = $row;
}

//Convert PHP Array to JSON String


echo json_encode($items);

//save jason data to file - optional- for viewing of json file only
//$json_data = json_encode($items);
//file_put_contents('sample_php_to_json1.json', $json_data);

?>

Vous aimerez peut-être aussi