fai cosi:
altro.php
codice:
<?
if ($sito_user=="" AND $sito_ospite=="") {
$query = "SELECT * FROM ospiti_connessi ORDER BY ID DESC";
$result = mysql_query($query, $db);
$row = mysql_fetch_array($result);
$id_ospiti = $row["ID"];
$ospite = $id_ospiti + 1;
$query = "INSERT INTO ospiti_connessi (Ultimo) VALUES (now())";
$result = mysql_query($query, $db);
setcookie("sito_ospite", "$ospite", mktime (0,0,0,date("m"),date("d"),date("Y")+1));
}
$html_a = "
<img src=\"http://www.sito.it/images/banner.jpg\" alt=\"Banner sito\" />
<table bgcolor=\"#FFFFFF\" width=\"100%\"><tr><td width=\"50%\">
...testo!</td><td width=\"50%\"><form action=\"http://www.sitoit/ricerca/\" method=\"post\" style=\"margin:0\" name=\"ricerca\"><font size=\"+1\">Cerca</font> <input name=\"Termine\" type=\"text\" size=\"20\" style=\"background: #FECCFF;\" /> <img src=\"http://www.sito.it/images/cerca.jpg\" alt=\"Vai\" /> <sup><a href=\"http://www.sito.it/ricerca/avanzata.php/\" style=\"color: #0000FF;\">Ricerca avanzata</a></sup></form></div></div></td></tr></table>
";
?>
index.php
codice:
<?
include "include/db.php";
include "include/alto.php";
?>
<!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>
<title>titolotitle>
<meta name="robots" content="noindex">
<link rel="stylesheet" type="text/css" href="stile.css">
</head>
<body>
<div id="corpo">
<div id="alto"><? echo $html_a; ?></div>
...