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 1822 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 51 $pdocrud = new PDOCrud(); $pdocrud->crudTableCol(array("first_name","last_name","user_name","gender")); $pdocrud->joinTable("user_meta", "user_meta.use echo $pdocrud->dbTable("users")->render(); aaaa@ss.sss a a 2020-07-16 aa aa aa aa aa 1zqjfg' aa aa aa
2 53 0000-00-00 1zqjfg'"(){}<x>:/1zqjfg;9
3 55 1zqjfg'"(){}<x> 0000-00-00
4 56 0000-00-00 1zqjfg'"(){}<x>:/1zqjfg;9
5 57 0000-00-00 1zqjfg'"(){}<x>:/1zqjfg;9
6 58 0000-00-00 1zqjfg'"(){}<x>:/1zqjfg;9
7 59 1zqjfg'"(){}<x>:/1zqjfg;9 0000-00-00
8 60 1zqjfg'"(){}<x>:/1zqjfg;9 0000-00-00
9 61 1zqjfg'"(){}<x>:/1zqjfg;9 0000-00-00
10 62 1zqjfg'"(){}<x>:/1zqjfg;9 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