tsptom
02-14-2014, 10:57 PM
I have another area of my website that requires a login and sometimes members use a different password for this login than the one they use in the forum. This is probably frustrating for them as they try to remember which PW goes where.
I would like to be able to have them log into this other area using the PW they set up OR their forum PW if it is different.
I'm not sure exactly how this would be done but maybe something along these lines?
SELECT *
FROM mytable m
where m.username= '". $_POST['username'] ."' and
(m.password='" . $_POST['Password'] . "' OR
'" . $_POST['Password'] . "' =
(SELECT md5(CONCAT(md5(v.password, salt)))
FROM user v
WHERE v.username = '". $_POST['username'] ."'))
I know it's wrong so whatever you can add would be appreciated.
Thanks
I would like to be able to have them log into this other area using the PW they set up OR their forum PW if it is different.
I'm not sure exactly how this would be done but maybe something along these lines?
SELECT *
FROM mytable m
where m.username= '". $_POST['username'] ."' and
(m.password='" . $_POST['Password'] . "' OR
'" . $_POST['Password'] . "' =
(SELECT md5(CONCAT(md5(v.password, salt)))
FROM user v
WHERE v.username = '". $_POST['username'] ."'))
I know it's wrong so whatever you can add would be appreciated.
Thanks