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 20 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 40 dfgh 81dc9bdb52d04dc20036dbd8313ed055 0000-00-00
2 41 dedw dsa sdads ewewq eddew@gt.io 43214321 0 2024-12-11 0 32432 34214 4321432 32q4321 3 1 323 43rewtrewg
3 42 pippo 0c88028bf3aa6a6a143ed846f2be1ea4 0000-00-00
4 43 toto toto toto otototo cl@gmail.com 01020304506 0 2024-12-04 0 seee hnhnhn hnhnhn hnhnhn 0 0 1414141 bbvbxc
5 45 dsfsdf sdfsd sdf sdfds cl@gmail.com 01020304506 0 2024-12-10 0 dsf sfsd fdf sdfsdf 2 0 1414141 dsfsdf
6 46 xxxxx yyyy sqsq L5znqgisDl qsqsqs@kkk 1222222 0 2025-01-28 3 sq sq sqsqsq 3 0 3 sqsqsqs sqsqsqs
7 47 r a98f6f64e6cdfac22ab2ffd15a7241e3 0000-00-00
8 51 aaa 0000-00-00
9 52 trulla 0000-00-00
10 53 ddcd 0000-00-00
# 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