ppeasy/public/languages/en/editorfilequestionario.php

31 lines
750 B
PHP

<br>
<a href="editindex.php"> Torna alla pagina di scelta </a>
<br><br>
<?php
// configuration
$url = 'https://www.acscreativesolutions.com/cmctrf/HTML/languages/it/editorfilequestionario.php';
$file = 'questionaire.php';
// check if form has been submitted
if (isset($_POST['text']))
{
// save the text contents
file_put_contents($file, $_POST['text']);
// redirect to form again
header(sprintf('Location: %s', $url));
printf('<a href="%s">Moved</a>.', htmlspecialchars($url));
exit();
}
// read the textfile
$text = file_get_contents($file);
?>
<!-- HTML form -->
<form action="" method="post">
<textarea name="text" rows="50" cols="150"><?php echo htmlspecialchars($text) ?></textarea>
<input type="submit" />
</form>