Allora, ho un problema:
ho questo codice php:
E poi ho questo per richiamare il titolo, ma qualcosa non funziona:Codice PHP:<?php
$db = "database.txt"; // in questo file verranno salvati i dati.
$_SESSION["titolo"] = $_POST["element_1"];
$fp = fopen($db, "a+");
$_SESSION["titolo"] = $_POST["element_1"];
fwrite($fp, $_POST["element_1"] . " | " . $_POST["element_8"] . " | " . $_POST["element_2"] . " |
" . $_POST["element_2_1"] . " | " . $_POST["element_2_2"] . " | " . $_POST["element_2_3"] . " |
" . $_POST["element_3"] . " | " . $_POST["element_3_1"] . " | " . $_POST["element_3_2"] . " |
" . $_POST["element_4"]); // salvo i dati nel file
fclose($fp);
foreach(file("vostri_viaggi2.html") as $f) {
echo $f . "<br />";
}
?>
Codice HTML:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Ciao
</head>
<body>
<h2>
<?php ".$_SESSION['titolo']." ?>
</h2>
</body>
</html>

