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 1 2016-11-11 Footbal, volleyball, dddd BE DDT USA newyork 1 3 452005 about desc.
2 36 test test test dsafdasd into@xxx.de 05054/987718 1 2019-02-22 dsaf sdfad sadfsd asdfad asdf 0 2 adsf sdfasdf
3 37 fred flint ffre qwerefr fred@gravel.com 713-789-6548 0 2019-02-04 none 4 yr bedrock gravel 123 Bedrock 3 1 12345 qw
# 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