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 1 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 Daniel Kelleher dave@test.com dave dankelleherr@icloud.com 7722853267 0 2024-11-01 1 test test 1332 fake ct Stuart 4 0 34994 tesat
# 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