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 27 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 0 2016-11-11 Footbal, volleyball, dddd BE DDT USA newyork 0 3 452005 about desc.
2 31 ==otocayujelrxa otocayujelrxa =iheroix@azmail.com 0000-00-00
3 32 otocayujelrxa =i6IwVSXu 0000-00-00
4 33 ==collectionFeach collectionFeach =cratarexra2008@plusgmail.ru 0000-00-00
5 34 collectionFeach =j!Oh68gkh3U 0000-00-00
6 35 ==Ronaldbycle Ronaldbycle =lyubava.lowushkina@mail.ru 0000-00-00
7 36 Ronaldbycle =Xck3yc4i&1T 0000-00-00
8 37 ==Steeveheima Steeveheima =innazhut@yandex.com 0000-00-00
9 38 Steeveheima =freemqN288 0000-00-00
10 39 Kennethsaich =7c%2fT3zcaP 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