Codice PHP:
<?php
if(!isset($_POST['submit'])) { ?>
<form method="POST" action="login.php">
<i>Username :</i> <br>
<input type="text" name="username" value="" /><br>
<i>Password :</i> <br>
<input type="password" name="password" value="" /><br>
<input type="submit" name="submit" id="login" value="Login" />
</form>
<?php } else {
include 'core.php';
$username = mysql_real_escape_string($_POST['username']);
$password = mysql_real_escape_string($_POST['password']);
$query = "SELECT * FROM chatgabrieleanna WHERE username = '{$username}' AND password = '{$password}'";
$result = mysql_query($query,$conn);
$num_rows = mysql_num_rows($result);
if($num_rows == '1') {
echo "Login effettuato con successo!";
} else {
echo "Dati errati";
}
}
?>
su questo script mi da dati errati , sai come aggiustarlo ? sto impazzendo ,....