Callback functions Add callback function in PDOCrud

  
                                $pdocrud = new PDOCrud();
                                //Add callback function "beforeloginCallback" on before_select event
                                $pdocrud->addCallback("before_select", "beforeloginCallback");
                                echo $pdocrud->dbTable("users")->render();

                                // Available events are 

                                //This 'beforeloginCallback' function must be added on script/pdocrud.php file
                                // e.g. before data submission encrypt user password
                                function beforeloginCallback($data, $this) {
                                    $data["data"]["user_pass"]= md5($data["data"]["user_pass"]);
                                    return $data;
                                }
                            

Callback function in PDOCrud

Users

Showing 1 to 3 of 3 entries

# User id First name Last name User name Password Email Phone Gender Birth date Hobbies Educational status Company name Address City State Country Zip code About yourself Actions
1 26 Jon Snow jon jonathaon jon@gmail.com 99009900 male 2016-11-11 Footbal, volleyball, dddd BE DDT USA newyork 0 3 452005 about desc.
2 31 Dev Smith admin admin_ddt@123 dev.ddtech@gmail.com 09977848644 male 2019-03-29 Chess BA Digital Dreams Technology A 106 leeds Enclave CA CA USA 45200 lorep ipisusm
3 32 uhi uu 2d123d123d 23d23d23d qkowokqwn@kk -098 piuh 2019-05-14 23d23d 23d123d 3f34f34f 23d23d 23d23d 213d23d 23d3 23333d23d123d e3c3ef
# User id First name Last name User name Password Email Phone Gender Birth date Hobbies Educational status Company name Address City State Country Zip code About yourself Actions