Output from Input - need to store permanently, not just a temporary, dnamic display
I have used the following bits of code to have and HTML form display in on a page (in my beta I threw it in a table w/ some .css - besides the point...) --- please continue to MySQL question at end of this code snippet...
form.html
<html><head><title></title></head><body>
<form action="htmloutput.php" method="post" name="frm" id="frm"><!-- Use post as get-string has limited size -->
<input type="hidden" name="encoded_html" value="">
<textarea cols="40" rows="20" name="html"
onChange="this.form.encoded_html.value = escape(this.form.html.value);"></textarea>
<input type="submit">
</form>
</body></html>
htmloutput.php
PHP:
<html><head><title></title></head><body>
<?php
// This displays the encoded string
echo $_POST["encoded_html"];
echo "<hr>";
$html = urldecode ($_POST["encoded_html"]);
// This creates an html page
echo $html;
echo "<hr>";
// This displays the html
echo htmlspecialchars($html);
?>
</body></html>
Now that I have been able to get my text data to display correctly - very happy about this !! - how might I tie this to a MySQL database in order to bypass the dynamic (temporary) nature of the resulting page and have it actually store to the server - a custom end-user defined page?
( many thanks to marky2coats and paulnaj <most EXCELLENT template> for your combined help)
Regards,
Brian