Salve qualcuno mi sa spiegare perchè questo script non mi cerca niente ma mi cancella quello che scrivo nel form
Codice PHP:
<?php
include("../config.ini.php");
if(isset($_GET['Invio'])){
// PAROLA
$cerca= mysql_real_escape_string(strip_tags(htmlentities($_GE['nick'])));
//QUERY
$query= "SELECT * FROM utenti WHERE user='".$cerca."' AND nome = '".$cerca."'";
$select=mysql_query($query,$dbh) or die("Query fallita
".mysql_error()."
".$query);
//CONTO I RISULTATI
$NumRow = mysql_num_rows($select);
// Il recordset NON è vuoto
if ($NumRow>0){
echo "Abbiamo trovato solo i segeunti utneti che si chiamano [b]".$cerca."[/b]
";
while($row = mysql_fetch_array($select)){
echo "UTENTE ".$row['user']." NOME ".$row['nome']."";
}
}
echo"".$_GET['nick']."";
}
?>
<html>
<body>
<form action="<? echo $_SERVER['PHP_SELF']; ?>" method="get">
<input type="text" name="nick" />
<input type="submit" id="submit" name"submit" value="Invio" />
</form>
</body>
</html>