Now it has transformed into this:
<HTML>
<BODY>
<?php
if(!empty($_POST['submit'])){
include ("dbdats.txt");
$link = mysql_connect ( "$db_host", "$db_login", "$db_pass");
if(($link) && (mysql_select_db($database,$link))){
print("Connessione al server avvenuta correttamente.<br>");
}
else{
print( "Non riesco a connettermi al server.<br>");
exit;
}
$user=$_POST['user'];
$password=$_POST['password'];
$query=(mysql_query("select * from admin where User='%$user%'",$link));
$row = mysql_fetch_array($query);
if($row["user"]==$user){
$dati=mysql_query("select * from admin where (User='%$user%' AND
Ppassword='%$password%');",$link);
$row2 = mysql_fetch_array($dati);
if(($row2["user"]==$user)&&($row2["password"]==$password))
echo"Autenticazione riuscita.<br>Bentornato utente ".$user.".<br>";
else
print("Autenticazione non riuscita.<br>Password non corretta.<br>");
}
else
echo"Utente <b>".$user."</b> inesistente.<br>";
}
else{ ?>
<form method="POST">
Inserire UserId<br>
<input type="text" size="10" name="user">
<br>Inserire Password<br>
<input type="password" size="10" name="password">
<input type="submit" name="submit" value="Login">
</form>
<?php
}
?>
</BODY>
</HTML>
Now nothing is validated.
Everything is non valid.
I still can't understand what i miss....
It seems something in the main queries... but what?
Claudio
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php