L'ho fatto ma mi presenta quest'altro errore:
Warning: Supplied argument is not a valid MySQL result resource in c:\apache\htdocs\database\result.php on line 55
Questo è il codice che fin'ora ho scritto:
Codice PHP:
<? include("config.inc.php");
if ( isset ( $_POST['chiave'] ))
{
if ( $where_clausule == '' )
{
$AND = ' AND ';
}
$where_clausule .= $AND . " nome='" . $_POST['chiave'] . "' " ;
$AND = '';
}
if ( isset ( $_POST['chiaveuno'] ))
{
if ( $where_clausule == '' )
{
$AND = ' AND ';
}
$where_clausule .= $AND . " sviluppatore='" . $_POST['chiaveuno'] . "' " ;
$AND = '';
}
if ( isset ( $_POST['chiavedue'] ))
{
if ( $where_clausule == '' )
{
$AND = ' AND ';
}
$where_clausule .= $AND . " piattaforma='" . $_POST['chiavedue'] . "' " ;
$AND = '';
}
if ( $where_clausule == '')
{
echo 'Non hai inserito alcun parametro da ricercare' ;
}
else
{
$query = mysql_query ( "SELECT id,data,nome,sviluppatore,genere,piattaf
orma from elenco_games where ".$where_clausule ) ;
while ( $row = mysql_fetch_array ( $query ))
{
echo "<div class=\"boxcella\">";
echo "<div class=\"boxcellaimg\">";
echo "<img src=\"immagini/imglink/$row[nome].gif\"></div>";
echo "<a href=\"bhe.php?id=$row[id]\">$row[nome]</a>
" ;
echo "$row[sviluppatore]
";
echo "$row[genere]
";
echo "$row[piattaforma]
";
echo date('j/n/y', $row[data]);
echo "</div>";
}
}
?>