Moron Posted April 9, 2008 Share Posted April 9, 2008 This was working before I had to make some query changes. In the query: WHERE M2.[EMPNO] = '".$_POST['empcode']."' and M2.[Last4SSN] = '".$_POST['password']."' They log in with their employee number and last of of the SSN. So far, so good. Then they hit a sub-page. All is well. When they click a link to go back, it doesn't accept their username or password (or both). Each page has the following at the top: session_start(); if(isset($_POST['password'])) {$_SESSION['password'] = $_POST['password'];} if(isset($_POST['empcode'])) {$_SESSION['empcode'] = $_POST['empcode'];} I don't know what's causing this, but it was working until I changed the WHERE statement this morning. Quote Link to comment Share on other sites More sharing options...
uniflare Posted April 9, 2008 Share Posted April 9, 2008 you are using POST variables in the query, use SESSION variables instead. WHERE M2.[EMPNO] = '".$_SESSION['empcode']."' and M2.[Last4SSN] = '".$_SESSION['password']."' Quote Link to comment Share on other sites More sharing options...
Moron Posted April 9, 2008 Author Share Posted April 9, 2008 Oops. Double post. Quote Link to comment Share on other sites More sharing options...
Moron Posted April 9, 2008 Author Share Posted April 9, 2008 you are using POST variables in the query, use SESSION variables instead. WHERE M2.[EMPNO] = '".$_SESSION['empcode']."' and M2.[Last4SSN] = '".$_SESSION['password']."' That works. Thanks!!!! 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.