Ciao ragazzi, il mio webserver mi manda questo bel errore:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in c:\programmi\easyphp1-8\www\accedi_e.php on line 15
In una pagina d questo tipo:
<html>
<head>
<title>Accedi</title>
</head>
<body>
<?php
include("sql.php");
$username=$_POST["username"];
$password=$_POST["password"];
$db=mysql_connect($db_hostname,$db_username,$db_pa ssword);
if(!$db){ print("Errore di connessione a MySql
");}
mysql_select_db($db_name,$db);
$select="SELECT password FROM utente WHERE username = $username ;";
$result = mysql_query($select,$db);
while($row = mysql_fetch_array($result)){
if($row["password"] != $password){ print("Dati non corretti
"); }
else { print("Dati corretti
"); }
}
mysql_close($db);
?>
</body>
</html>
Qualcuno sa illuminarmi?? Gli sarei immensamente grato...grazie!