Código PHP:
<?php
$link = mysql_connect("localhost","","");
mysql_select_db("registro");
$consult = "SELECT * FROM registro WHERE login ='$login'";
$result = mysql_query($consult);
$pa = md5($password);
echo $pa . "<br>";
echo $password . "<br>";
if($row = mysql_fetch_array($result)){
if ($row['password'] == $password) {
echo "Ahora sí";
header("Location: upload.php");
exit();
} else {
echo "<font face=\"Tahoma\" size=\"2\">Contraseña inválida.</font>";
}
} else {
echo "<font face=\"Tahoma\" size=\"2\">Nombre de usuario no válido.</font> " . mysql_error();
}
mysql_close();
?>