ecco il codice ::agina di ricerca::
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento senza titolo</title>
</head>

<body>
<form id="form1" name="form1" method="post" action="risposta.php">
<label>marca
<input name="marca" type="text" id="marca" />
</label>
<label>modello
<input name="modello" type="text" id="modello" />
</label>
<label>cerca
<input type="submit" name="cerca" id="cerca" value="Invia" />
</label>
</form>
</body>
</html>



pagina risultato:::

<?php require_once('Connections/beatrice.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

$colname_Recordset1 = "-1";
if (isset($_POST['marca'])) {
$colname_Recordset1 = $_POST['marca'];
}
mysql_select_db($database_beatrice, $beatrice);
$query_Recordset1 = sprintf("SELECT * FROM modelli WHERE marca = %s ORDER BY foto ASC", GetSQLValueString($colname_Recordset1, "text"));
$Recordset1 = mysql_query($query_Recordset1, $beatrice) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento senza titolo</title>
</head>

<body>
<table border="1" cellpadding="3" cellspacing="3">
<?php if ($totalRows_Recordset1 > 0) { // Show if recordset not empty ?>
<tr bgcolor="#FFFF66">
<td>foto</td>
<td>id</td>
<td>marca</td>
<td>modello</td>
<td>prezzo</td>
<td>anno</td>
<td>cc</td>
<td>alimentazione</td>
<td>colore</td>
<td>km</td>
</tr>
<?php } // Show if recordset not empty ?>

<?php do { ?>
<tr bgcolor="#FF99CC">
<td><?php echo $row_Recordset1['foto']; ?></td>
<td><?php echo $row_Recordset1['id']; ?></td>
<td><?php echo $row_Recordset1['marca']; ?></td>
<td><?php echo $row_Recordset1['modello']; ?></td>
<td><?php echo $row_Recordset1['prezzo']; ?></td>
<td><?php echo $row_Recordset1['anno']; ?></td>
<td><?php echo $row_Recordset1['cc']; ?></td>
<td><?php echo $row_Recordset1['alimentazione']; ?></td>
<td><?php echo $row_Recordset1['colore']; ?></td>
<td><?php echo $row_Recordset1['km']; ?></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>


<?php if ($totalRows_Recordset1 == 0) { // Show if recordset empty ?>


spiacenti nessun risultato</p>
<?php } // Show if recordset empty ?>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>