header('Content-type: text/html; charset="iso-8859-1"');
//includo la connessione al db, header
include("conf/db.php");
include("conf/mq.php");
include("template/header.php");
?>
if (isset($_POST['q']))
$cosa =$_POST['q'];
else
if (isset($_GET['q']))
$cosa =$_GET['q'];
else
$cosa='lemmi';
if ($cosa<>'lemmi' && $cosa<>'autori' && $cosa<>'lingue')
$cosa='lemmi';
echo "
";
$where = " WHERE Voce like '".$lettera."%'";
if ($cosa=='lingue') {
$sel=",CodLin";
$inner = " INNER JOIN Lingue ON Voce=Lin ";
}
else {
$sel = "";
$inner = "";
}
?>
Nuova ricerca
echo "
";
$query="SELECT Voce,Num".$sel." FROM vocabolario".$cosa.$dove.$inner.$where.";";
$result=mysqli_query($db_conn, $query);
while ($row = mysqli_fetch_array($result)) {
echo "
".$row["Voce"]." (".$row["Num"].")
";
}
echo "
";
?>
include("template/footer.php");
?>