i am trying to run the code on server end but an error is occurring at the end of the code. can please help me to correct the code???
$adminid = $_REQUEST[‘adminid’];
$selectemployee = mysql_query("select * from employee where adminid = '".$adminid."'");
$posts = array();
if(mysql_num_rows($selectemployee))
{
while($post = mysql_fetch_assoc($selectemployee))
{
$posts[] = $post;
}
header('Content-type: application/json');
echo stripslashes(json_encode(array('[b]employee'=>$posts[/b])));
}
else
{
header('Content-type: application/json');
echo stripslashes(json_encode(array('[b]employee'=>'No record'[/b])));
}