desithugg Posted December 25, 2006 Share Posted December 25, 2006 umm i use both cookies and sessions for my login system depending on if the user has cookies enabled or not.it works fine but 1 person cant login...he uses internet explorer cookies enabled(accepts al cookies)..but he still cant get in not with cookies or sessions.I was wondering if theres any other way to pass information safley like username and password. Quote Link to comment https://forums.phpfreaks.com/topic/31828-cookies-vs-sessions/ Share on other sites More sharing options...
Hypnos Posted December 25, 2006 Share Posted December 25, 2006 PHP sessions, by default, use cookies. But you can also pass the session id over GET data (URL).Does your site use frames? That might be causing the issue, because of an old bug in IE.http://us3.php.net/session Quote Link to comment https://forums.phpfreaks.com/topic/31828-cookies-vs-sessions/#findComment-147657 Share on other sites More sharing options...
desithugg Posted December 26, 2006 Author Share Posted December 26, 2006 nope no frames..and i dont want to pass data through GET mainly because they can be seen in the url...and i will have to modify some 400 pages Quote Link to comment https://forums.phpfreaks.com/topic/31828-cookies-vs-sessions/#findComment-147717 Share on other sites More sharing options...
marcus Posted December 26, 2006 Share Posted December 26, 2006 You can try:[code=php:0]$username = $_POST['username'];$password = $_POST['password']; //or md5($_POST['password']) whichever you're usingif(isset($username) && isset($password)){ $cookie1 = setcookie("name","value","time"); $cookie2 = setcookie("name","value","time"); //etc... if($cookie1 && $cookie2){ //log in using cookies }else { $_SESSION['sess1'] = sess1; $_SESSION['sess2'] = sess2; }}[/code] Quote Link to comment https://forums.phpfreaks.com/topic/31828-cookies-vs-sessions/#findComment-147722 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.