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 2 of 2 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 31 Eighty Five admin 1111111 eightyfive@gmail.com 09977848644 Alpha Male 1982-04-13 Bangin' chics BA Digital Dreams Technology A 106 leeds Enclave CA CA USA 45200 lorep ipisusm
2 35 ddd dd rfff ffff ddd@gg.nnn ffff ffff 2021-04-21 fdfd fdfd fdfd dfdfdfd fdfdfd fdfdf dfdfd dfdfdf fdfd
# 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