hvandracas Posted February 8, 2011 Share Posted February 8, 2011 Well, my page contains a URL like file.php?userid=1&pass=passwordhashblablabla. I try to open the page on opera, mozilla, safari, google chrome and so browsers and it works fine. I get the message that id/pw match and user has logged in successfully. However, when I go to THE SAME url on IE, i get message that id/pw do not match. URL is still the same, history is cleaned... Thanks in advance. Quote Link to comment Share on other sites More sharing options...
trq Posted February 9, 2011 Share Posted February 9, 2011 We need to see code. Quote Link to comment Share on other sites More sharing options...
tibberous Posted February 9, 2011 Share Posted February 9, 2011 Yeah, no reason it wouldn't work just based off what your explaining. Sure you don't have some old cookie / session data stored on the non-ie browser? Quote Link to comment Share on other sites More sharing options...
trivikrama Posted February 9, 2011 Share Posted February 9, 2011 its not safe to pass id and password values through url. Better use a form or session variables. Quote Link to comment Share on other sites More sharing options...
hvandracas Posted February 9, 2011 Author Share Posted February 9, 2011 Well, it's just a bookmark page for mobiles. The code: session.php (included); <?php ini_set('session.use_cookies', 0); ini_set('session.use_only_cookies', 0); ini_set('session.name', 'sid'); ini_set('session.auto_start', 0); ini_set('session.use_trans_sid', 1); session_start(); ?> The file, that checks variables in url <?php if (isset($_GET['userid'])) { $userid = preg_replace("[^0-9]", "", $_GET['userid']); } else { $userid = '0'; } if (isset($_GET['pass'])) { $password = mysqli_real_escape_string($db, $_GET['pass']); } else { $password = '0'; } if (!mysqli_num_rows(mysqli_query($db, "SELECT vartotojo_vardas FROM vartotojai WHERE userid = '$userid' AND slaptazodis = '$password'"))) { // id and password do not match } ?> ?> 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.