I have change my forum from and old version to a new version , old version used MD5 and new version uses MD5 and Salt as there secure password my members run a app that looks at there username and password from forum database and lets them record online lap times from a game. I cant get the app to see the password anymore the app looks at this peace of php code. Please can you help me. THIS WORKED ON OLD FORUM WITH JUST MD5 $mysqlcon = mysql_connect('localhost', 'user', 'password') or die('Could not connect: ' . mysql_error()); mysql_select_db('database') or die('Could not select database'); $passhash = md5($passwd ); $authresult = mysql_query("SELECT username,password from forum_users WHERE username='$username' AND password='$passhash' ") or die('mysql error: ' . mysql_error() ); ------------------------------------------------------------------------------------------------------------------- And this works on a temperary db with no MD5 or salt $authresult = mysql_query("SELECT username,password FROM forum_users WHERE username='$username' AND password='$passwd' ") or die('mysql error: ' . mysql_error() ); ------------------------------------------------------------------------------------------------------------- THIS DOES NOT WORK ON NEW FORUM WITH MD5 and SALT $mysqlcon = mysql_connect('localhost', 'user', 'password') or die('Could not connect: ' . mysql_error()); mysql_select_db('database') or die('Could not select database'); //I tryed this $passhash == md5($salt['passwd']) // I tryed this $passhash = md5($salt['passwd']) // I tryed this $passhash == md5($passwd . salt ); // I tryed this $passhash = md5($passwd . salt ); $authresult = mysql_query("SELECT username,password from forum_users WHERE username='$username' AND password='$passhash' ") or die('mysql error: ' . mysql_error() );
Its been years sence my last codeings so i am a real newb again