var php_params = "job=SearchForm&task=PartialForm&tablename=Customer&uniq_field_value="+cust_name ;
var fields_to_BU = ['cust_name', 'cust_desig_2char', 'cust_desig_3char', 'region'] ;
var customer_id ;
$('#debug').html(php_params) ;
$.ajax({
url: '/cmdb/PHP/do_FormSearch_query.php',
method: "GET" ,
cache: false ,
data: encodeURIComponent(php_params) ,
dataType: 'JSON'
}).done(function(data)
{
alert("HERE THREE!");
customer_id = data.customer_id ;
$('input [name=cust_desig_2char]').val(data.cust_desig_2char) ;
$('input [name=cust_desig_3char]').val(data.cust_desig_3char) ;
$('input [name=region]').val(data.region) ;
$('#RtMgn_Customer').val(customer_id) ;
blah blah blah;
}) ; // EO AJAX .done function()
case "PartialForm":
$uniq_field_value = htmlspecialchars($_GET['uniq_field_value']) ;
$tablename = htmlspecialchars($_GET['tablename']) ;
switch($tablename)
{
case 'Customer':
do_mysql_multi("SELECT * FROM Customer WHERE `cust_name`= '".$uniq_field_value."' ;", 1, $result_vector1, $result_vector2) ;
echo json_encode($result_vector1['values'][1]) ;
break ;
What PHP returns (sample):
{"customer_id":"76","cust_name":"QATAR AIRWAYS","cust_desig_2char":"QR","cust_desig_3char":"QTR","region":"Middle East","note_id":"75750"}
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE