This is my PHP code:
<?php
mysql_connect("localhost","root","");
mysql_select_db("sowrun_mobile");
$ad_id = $_REQUEST['ad_id'];
$sql=mysql_query("SELECT * FROM tbl_user_registration where reg_AD_ID='".$ad_id."'");
$row='';
while($row=mysql_fetch_assoc($sql)){
$output[]=$row;
}
if($row == ''){
$out['reg_AD_ID'] = '111111';
$output[]=$out;
}
$jsonStr = json_encode($output);
print($jsonStr);
mysql_close();
?>
I am trying to send the parameter adid
from the Worklight adapter with the following method:
function getFeeds() {
WL.Logger.debug("inside method");
var input = {
method : 'get',
returnedContentType : 'json',
path : "ios/ClientadID.php"
};
ClientadID.php
contains the code which is written in the first code sample above.
I am trying to send the request from the adapter with the following parameters while invoking
the procedure. In the parameter window I am sending ad_id=1
but an error is throwing:
Notice: Undefined index: ad_id in C:\wamp\www\ios\ClientadID.php on line 6