Jump to content

Showing html in a textarea form?


Hughesy1986

Recommended Posts

Take a look at Tiny MCE

 

http://tinymce.moxiecode.com/

 

I use it frequently in forms to show formtted text in a textarea.

 

"TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances. "

 

 

Well other than what richardw said you could easily do a SQL query to select data from your table and just echo it out into a textarea.

 

$sql = "SELECT * FROM `profile` WHERE `id` ='$id'";
$res = mysql_query($sql) or die(mysql_error());
$row = mysql_fetch_assoc($res);
echo "<textarea rows=30 cols=30>$row[profile_text]</textarea>\n";

 

just a quick simple example if you're using a database

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.