No, ecco i file che ho adesso (index.php > form, elabora.php > che dovrebbe creare la pagina)
index.php
Codice PHP:
<html>
<head>
<title>Redirect-Link Generator</title>
</head>
<body>
<center><font face="Tahoma" size="15px">[b]Redirect-Link Generator[/b]</font></center>
<center><font face="Tahoma" size="4px">[b]Attenzione! Vieteto l'uso agli Utenti![/b]</font></center>
<hr width="70%">
<form action="elabora.php" method="POST">
<table border="0" cellpadding="2" cellspacing="0" align="center">
<tr><td>[b]Link al Download:[/b] </td><td> <input name="link" type="text"></td></tr>
<tr><td>[b]Nome pagina:[/b] </td><td> <input name="nome" type="text" maxlength="6">.html</td></tr>
<tr><td>[b]Dove verrà inserito il file:[/b] </td><td> <input name="dir" type="text" maxleght="6"></td></tr>
<td colspan="2" align="right"><input type="submit" value="Genera!"></td>
</tr></table>
</form>
</body>
</html>
elabora.php
Codice PHP:
<html>
<head>
<title>File creato!</title>
</head>
<body>
<?php
$link = $_POST['link']
$dir = $_POST['dir']
$nome = $_POST['nome']
// nome del file in cui inserire i testi
$file = "../concorsi/".$dir."/".$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, htmlspecialchars($_POST["link"]);
// chiude il file
fclose($fp);
?>
</body>
</html>