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 10 of 23 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 Dev23 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
2 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
3 35 cc 41fcba09f2bdcdf315ba4119dc7978dd 0000-00-00
4 37 dfsdfsdfsdfsdf 0000-00-00
5 39 123 244ffbcf4483ae7fc354e3f00db6b454 0000-00-00
6 40 dfgh 81dc9bdb52d04dc20036dbd8313ed055 0000-00-00
7 41 dedw dsa sdads ewewq eddew@gt.io 43214321 0 2024-12-11 0 32432 34214 4321432 32q4321 3 1 323 43rewtrewg
8 42 pippo 0c88028bf3aa6a6a143ed846f2be1ea4 0000-00-00
9 43 toto toto toto otototo cl@gmail.com 01020304506 0 2024-12-04 0 seee hnhnhn hnhnhn hnhnhn 0 0 1414141 bbvbxc
10 45 dsfsdf sdfsd sdf sdfds cl@gmail.com 01020304506 0 2024-12-10 0 dsf sfsd fdf sdfsdf 2 0 1414141 dsfsdf
# 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