Hello I entered a password protection to an admin module for a database a few years back using php3 - now the server has migrated to 5 and it does not work anymore - have looked at php.net but do not really know where to start.
First page has:
the second page : Connect DB.php3 has:
Any ideas where I can find the info or even better - where is it wrong..?
Very grateful for help.
First page has:
Code:
<form method="post" action="ConnectDB.php3" name="connection" onSubmit="return verifChamp(document.forms[0])"> <input type="text" name="login" size="20" maxlength="20"> <input type="password" name="pass" size="20" maxlength="20"> <input type="submit" name="connect" value="Connecter"> </form>
the second page : Connect DB.php3 has:
Code:
<?
$ok=0;
if( isset ($conn) && $conn=="OK") {
$ok=1;
}
else {
$u="Uxx";
$p="yyy";
$h="zzz";
mysql_connect($h,$u,$p);
$resPass=mysql(DBxx,"SELECT login, password FROM connection WHERE login = '$login' AND password = '$pass'");
$nbPass=mysql_numrows($resPass);
if( $nbPass < 1 )
$ok=0;
else
$ok=1;
}
if( !$ok ) :
?>
Very grateful for help.
Comment