Meglio usare <?php e non <?
Non sono sicuro di avere capito al problema. Comunque.
File : test9017.php
Codice PHP:<?php
if (isset($_POST['submit'])) {
$action = $_POST['submit'];
if ($action == "Salva") {
file_put_contents("pippo.txt",$_POST['meta']);
$meta_file = $_POST['meta'];
} else {
$meta_file = file_get_contents("pippo.txt");
}
} else {
$meta_file = "";
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<body>
<form action="test9017.php" method="post" enctype="application/x-www-form-urlencoded">
<p><strong>Meta:</strong></p>
<textarea rows="4" cols="95" name="meta" type="text" style="background-color:#dff"><?php echo htmlspecialchars("$meta_file") ?></textarea>
<br/>
<input type="submit" id="SubmitForm1" class="reddish" name="submit" value="Carica" />
<input type="submit" id="SubmitForm2" class="reddish" name="submit" value="Salva" />
</form>
</body>
</html>


Rispondi quotando
