L'ho messo così:
Codice PHP:
<?php
$nome = $_POST['nome'];
$title = $_POST['title'];
$scritte = $_POST['scritte'];
$download = $_POST['download'];
$scansione = $_POST['scansione'];
$screen = $_POST['screen'];
foreach ($_POST["categoria"] as $check )
{
echo $check. "
";
}
// $check = (isset($_POST['categoria']) AND is_array($_POST['categoria'])) ? $_POST['categoria'] : array();
// nome del file in cui inserire i testi
$file = "./hacks/".$nome.".html";
// apre il file in modalità "append", se non esiste lo crea
$fp = fopen($file, "a");
// inserisce i valori ricevuti dal form in coda al file
fputs($fp, "<html><head><title>" .$title. "</title><style type='text/css'>html, body {font-family: Tahoma, Arial, Helvetica, sans-serif;}</style></head><body>[b]" .$title. "[/b]
" .$scritte. "
[b]Download: [/b][url]http://adf.ly/116908/[/url]" .$download. "
[b]Scansione: [/b][url]http://adf.ly/116908/[/url]" .$scansione. "
[b]Screen: [/b]" .$screen. "
[b]Testato su: [/b]" .$check. "
</body></html>");
// chiude il file
fclose($fp);
// Scrive i link
echo "<center>
[url='./code/".$nome.".html']Vai al File Generato[/url] |
[url='index.php']Crea un Nuovo File[/url]
<iframe src='./code/".$nome.".html' width='1000' height='500'></iframe>
</center>";
?>
e mi scrive correttamente ciò che seleziono
come faccio xo a far uscire queste cose nel mio code?