wg_ Posted August 31, 2007 Report Share Posted August 31, 2007 Sveiki, Es te mēģini izveidot vienu lapu, bet kautkā nesanāk. Sākumā nevarēju izdomāt ko lietot... cookies vai sesijas, vismaz pie tā jautājuma tiku galā, izlasot dažus Exploit :P Es mēģināšu atspoguļot savu lapu sastāvu un savu problēmu. Login.php session_start(); $usr = $username; session_register('usr'); Profils.php session_start(); echo $_SESSION['usr']; Logout.php session_start(); session_destroy(); Sakiet lūdzu ja es kautko nepareizi pieietoju... Pie Profils.php tur ir savādāk, es pielietoju lai noteiktu lietotājvārdu no lietotāja. Lieta tāda kad tiklīdz es taisu 'echo' man viņš neko nerāda. Link to comment Share on other sites More sharing options...
Val Posted August 31, 2007 Report Share Posted August 31, 2007 login.php: session_register('usr'); ===> $_SESSION['usr'] = $username; Link to comment Share on other sites More sharing options...
wg_ Posted August 31, 2007 Author Report Share Posted August 31, 2007 session_start(); $usr = $username; session_register('usr'); $_SESSION['usr'] = $username; Izmēģināju šādi, bet pie login.php pieliku Echo lai pārbaudītu, bet viņš tur pat neparādīja neko. Link to comment Share on other sites More sharing options...
Delfins Posted August 31, 2007 Report Share Posted August 31, 2007 register_globals = on !? Ko a !? Link to comment Share on other sites More sharing options...
wg_ Posted August 31, 2007 Author Report Share Posted August 31, 2007 Es izveidoju failu .htaccess iekš tās mapes kur man ir tie faili ar šādu sastāvu: php_flag register_globals on Bet joprojām viņš uzskata ka $_SESSION['usr'] ir NULL. Link to comment Share on other sites More sharing options...
Delfins Posted September 1, 2007 Report Share Posted September 1, 2007 nu un kas ir iekš $username ?! pirms piešķir Link to comment Share on other sites More sharing options...
wg_ Posted September 1, 2007 Author Report Share Posted September 1, 2007 DOH! Paldies ;) $username bija cookies domats, aizmirstu par to. Sajaucos pats sava sistema :P Link to comment Share on other sites More sharing options...
Paulinjsh Posted September 3, 2007 Report Share Posted September 3, 2007 kodējam ar register_globals = off Link to comment Share on other sites More sharing options...
Recommended Posts