Reputation: 642
I used this JQUERY code module for some purpose
$("#notice").show().load('update.php?first=1&institute='+sch+'&institute_code='+code,function(data,statusTxt,xhr) {
$('#notice').show().html(data);}
});
update.php?first=1&institute='+sch+'&institute_code='+code in the above code to be loaded but its not working as it should work
On update.php I used this code
echo 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'];exit;
and the output i got is
http://localhost/teach/index/update.php?first=1&institute=Delhi
While it should be
http://localhost/teach/index/update.php?first=1&institute=Delhi&institute_code=441
&institute_code=441 part is missing,
where am i making mistake? I know its a silly mistake but i am wasted of searching that mistake.
Upvotes: 0
Views: 48
Reputation: 1
This is usually where I find the problem when data is posting properly also make sure you have the code association proper, to assign the correct database properly to the url bar.
/Edit/ Try this:
$("#notice").show().load('update.php?first=1&institute='+sch+'&institute_code='+code,function(data,statusTxt,xhr) {
$('#notice').show().html(data);}
);
/Edit/
Upvotes: 0
Reputation: 133403
load()
you don't need to set data using .html()
.show()
in the callback method onlyCode
$("#notice").load('update.php', {
'first': 1,
'institute': sch,
'institute_code': code
}, function (data, statusTxt, xhr) {
$('#notice').show();
});
Upvotes: 3