Good morning phpraders, Happy new year 2020 to all. Please when i close phprad and reopen all functions defined in the apicontroller are no more. whats the solution to this. thanks.
Good morning Phpraders, while executing my project i encountered this error. Please show the way out. thanks. Error Message: syntax error, unexpected '__allmenulist' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)
Thanks @wilvin for your response but its not working. i tried another approach of sending the data through controller(score/getnames/cname/sname), but still not working. it cant retrieve data from the student table to populate the list.
Note: the controller is ScoreController(getnames is a method in here). the View is score/add.php(this is where the ajax request is written).
Thanks @willvin for the response and interest. i want values from list-box 1 and list-box 2 to determine the value list-box3 should contain. I did this: $('#ctrl-section').on('change', function(){ var cname= $('#ctrl-class').val(); var sname =$('#ctrl-section').val(); $.ajax({ url:'score/getnames.php', type:'post', data:{cname:cname,sname:sname}, dataType:'json', success:function(response){
//$('#ctrl-student_name').empty();
$('#ctrl-student_name').html(response);
} });
}); ============================================= //getnames.php file $lookup_class=$_POST['cname']; $lookup_section=$_POST[sname]; $db = $this->GetModel(); $sqltext = "SELECT CONCAT(first_name,' ',middle_name,' ',surname) AS fullname FROM student WHERE class= ? AND section= ?"; $queryparams = array($lookup_class,$lookup_section); $arr = $db->rawQuery($sqltext,$queryparams); $flnames= array(); foreach($arr as $fullnames){ $studname= $fullnames['fullname']; $flnames[] = array("names"=> $studname);
} echo json_encode($flnames);
view the image attached. the output gives empty options. Thanks once agian.
Good afternoon PHPRADERS, i am having issues with ajax post request. How do i send data to the specified URL. It doesn't seem to work after updating to this latest release. HELP!!!
Secondly, i cant seem to create custom functions in the sharedcontroller. How do i accomplish this in PhPraD. Thanks for the assistance.