Here’s the code I came up on my lunch break with after a short conversation with Phillip about using Cookies to save text:
-
<?php
-
$starttext = "Type in the text area to change this text";
-
-
$_SESSION[‘text’] = $_POST[‘text’];
-
}
-
else{
-
$_SESSION[‘text’] = $starttext;
-
}
-
?>
-
<form name="texteditor" method="post" action="">
-
<br/>
-
<input type="submit" name="save" value="Save Text" />
-
</form>