Session, cookie sharing, and session loss: one week. The cookie only saves one automatic logon. Session, which stores the name of the export column (Chinese/English name system ). There are nearly 30. For example, PHPcode $ session ['userinfo'] = 'User Center'; All sessions are in the head. php session, cookie sharing, and session loss. it has been one week.
The cookie only saves one automatic logon.
Session, which stores the name of the export column (Chinese/English name system ). There are nearly 30. For example:
PHP code
$ Session ['userinfo'] = 'User Center ';
All sessions are in head. php and referenced by all files.
Some code is as follows:
PHP code
Query ("select authority from setting_user where number = '". $ number. "'and password = '". $ pass. "'"); $ r = $ q-> fetch_array (MYSQLI_USE_RESULT); (int) $ authority = $ r ['authority']; // permission assignment if ($ q-> num_rows> 0) {// assign the display name $ qShow = $ m-> query ("select * from setting_display where user = '". $ number. "'Order by id desc limit 1"); $ rShow = $ qShow-> fetch_array (MYSQLI_USE_RESULT ); {$ _ SESSION ['Grouping '] = $ rShow ['Grouping ing']? $ RShow ['sorting ing']: NULL; $ _ SESSION ['Po'] = $ rShow ['Po']? $ RShow ['Po']: NULL; // many sessions here if ($ _ POST ['describerme']) {setcookie ("u", $ number, time () + 3600); setcookie ("p", $ pass, time () + 3600) ;}}$ _ SESSION ['auth'] = $ number; switch ($ authority) {case 1: echo "script window. location. href = 'main. php? O = show '; script "; $ _ SESSION ['admin'] = 1; break; default: echo" script window. location. href = 'main. php? O = show '; script "; $ _ SESSION ['admin'] = NULL; break;} else {echo"