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 5 of 5 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 50 MAc Nolo Macnolo 696969 mac@nolo.net 5555555 Masculino 0000-00-00 nnn nn nnnnn esp malaga es spain 123 asdfasdf
2 51 lau Ra Laura 123456 lau@ra.net 234345456 Femenino 1990-05-01 asdf asdfasdf asdf asdf Mlaga es Spain 123 asdfa
3 52 MAc Nolo Macnolo 123456 mac@nolo.net 234523452345 Masculino 1990-05-01 guitar Aprendiz Ninguna Belgrano 1 Necochea Buenos Aires Argentina 5555 No nada
4 53 MAc Nolo Macnolo 123456 mac@nolo.net 234523452345 Masculino 1990-05-01 guitar Aprendiz Ninguna Belgrano 1 Necochea Buenos Aires Argentina 5555 No nada
5 54 dsaf sdf asdf asdf t@t.com 12 0 2021-05-05 3 gsdffg sdfg sdffg 1 0 1 dsfg dsffg
# 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