Skip to main content

Show Posts

This section allows you to view all Show Posts made by this member. Note that you can only see Show Posts made in areas you currently have access to.

Messages - ubbxst

1
Questions / functions in apicontroller
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.
3
Questions / Corrupt or edited .ppm
Happy holidays Phpraders, please how can i recreate a .ppm file that has been edited or corrupted for an existing project folder.
5
Questions / Re: Error Message
good afternoon @willvin. no i dont have. But what would have been done in case i encounter similar challenge. thanks.
6
Questions / Re: Error Message
@willvin sorry for the delay, i stepped out.
did the project in 2.6.1 then after upgrading to 2.6.9 it flagged the error i stated.
7
Questions / Re: Error Message
@willvin it's a project from previous version in new version. After previewing it came up with that error.
9
Questions / Error Message
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)
11
General Discussion / Re: Ajax post request
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).
12
General Discussion / Re: Ajax post request
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.
13
General Discussion / Ajax post request(SOLVED BY Willvin)
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.