Cibiņš Posted July 15, 2011 Report Share Posted July 15, 2011 Nesaprotu vienu lietu. KĀPĒC NETIEK IZVEIDOTA SESIJA??? <?php $config = array(); $config['email'] = 'demo@demo.com'; $config['password'] = 'demo123'; // Show all errors except the notice ones error_reporting(E_ALL ^ E_NOTICE); // Initialize session session_id(); session_start(); header('Cache-control: private'); // IE 6 FIX if($_POST['action'] == 'user_login') { $post_email = $_POST['email']; $post_password = $_POST['password']; $ses_username = $post_email; // check username and password if($post_email == $config['email'] && $post_password == $config['password']) { // No error? Register the session & redirect the user to his/her 'Control Panel' $_SESSION['username'] = $ses_username; if($_POST['remember_me']) { // set the cookies for 1 month setcookie ("remember_me", true, (time() + TIME_DIFF) + (3600 * 24 * 30)); setcookie ("info", $user_id.','.md5($password), (time() + TIME_DIFF) + (3600 * 24 * 30)); } echo 'OK'; // this response is checked in 'process-login.js' } else { $auth_error = '<div id="notification_error">The login info is not correct.</div>'; echo $auth_error; } } ?> Quote Link to comment Share on other sites More sharing options...
waplet Posted July 15, 2011 Report Share Posted July 15, 2011 pēc kā tu nosaki, ka neizveidojas? debugo kodu, skaties, kurā vietā kautk as pazūd. Quote Link to comment Share on other sites More sharing options...
Cibiņš Posted July 15, 2011 Author Report Share Posted July 15, 2011 (edited) Aa viss čiki, aizmāršība :D Edited July 15, 2011 by Cibiņš Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.