Se metto salva tramite il pulsante submit, il testo nel database viene salvato, ma quando vado a vedere la textarea non si visualizza quello che è stato salvato...
ecco a te, anche se ho fatto un semplice copia incolla...
codice:
<?
include 'db.inc.php';
$db = mysql_connect (MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD) or
die('Non è possibile collegarsi al db!');
mysql_select_db(MYSQL_DB, $db) or die (mysql_error($db));
$result = mysql_query("select * from appunti'");
while($array=mysql_fetch_array($result)){
$testo=$array['testo'];
}
?>
<form method="post" action="<?$PHP_SELF?>" name="formData" enctype="multipart/form-data">
<input type="hidden" name="op" value="mod">
<label for="firstname" class="testo2">Testo 5: </label>
<textarea name="testo" cols="80" rows="15"><?php echo stripslashes($testo); ?></textarea>
<center><input id="button" type="submit" value="Invia Testo"></center>
</form>
//Adesso recuperi il testo immesso da te
<?
if($_POST['op']=="mod") {
$testo=$_POST['testo'];
$result = mysql_query ("insert into appunti(testo) values('$testo')");
if($result) { echo"<script language=javascript>";
echo"document.location.href='prova.php'";
echo"</script>";
} else {
echo"Inserimento fallito".mysql_error();
}
}
?>
clicca qui: http://wikiforix.lwsserver.com/mod-pannel/prova.php