TP update data PHPcode // profile publicfunctiongeren () {if (! Isset ($ _ SESSION [C (& quot; USER_AUTH_KEY & quot;)]) {$ msg = & quot; update data through TP
PHP code
// Archive public function geren () {if (! Isset ($ _ SESSION [C ("USER_AUTH_KEY")]) {$ msg = "log on ";} else {$ msg = $ _ SESSION [C ("USER_AUTH_KEY")] ;}$ this-> assign ('MSG ', $ msg ); // ================================ obtain logon information ========================== =============$ gr = M ("admin "); $ baide = $ gr-> select (); $ this-> assign ("baide", $ baide); $ this-> assign ("title ", 'extreme interactive office automation system'); $ this-> display ();} public function upgr () {// modify the edit Content header ("Content-Type: text/html; charset = utf-8 "); $ Form = M (" admin "); $ data ['id'] = $ _ GET ['id']; $ data ['name'] =_ _ GET ['name']; $ data ['password'] =$ _ GET ['password']; $ data ['sex'] = $ _ GET ['sex']; $ data ['bumen'] = $ _ GET ['bumen']; $ data ['tel'] =_ _ GET ['tel']; $ data ['QQ'] =$ _ GET ['QQ']; $ data ['email '] = $ _ GET ['email']; $ data ['dizhi'] = $ _ GET ['dizhi']; $ data ['IMG '] =_ _ GET ['IMG']; if ($ data) {$ upgr = $ Form-> where ('Id = '. $ data ['id'])-> save ($ data); if ($ upgr) {echo"