Hi everyone,
this is a curious little problem that I have run into that I can not quite explain.
Login box: contains two fields for username and password. On submit it gets sent to login.php where by sessions are registered for the username(I.e. 'neil') if the username/password is found using:
SELECT * FROM cms_admin WHERE username='$myuser' and password='$mypassword'
Echo'ing the $_SESSION['username'] shows the username as correct, i.e. 'neil'.
However! If we add a space after the username when logging in, the echo statement of $SESSION['myuser'] shows 'neil' but when progressing to the user menu the $SESSION['myuser'] miraculously adds in the space at the end of the username.
This is damn confusing which i do apologise for but any suggestions anyone may have I am sure would be amazingly helpful.