jake2891 Posted August 5, 2008 Share Posted August 5, 2008 Hi Guys Im using a wysiwyg rich text editor in my php page to change a textarea into a htmlarea. The problem is when I post the area it contains nothing everytime and I have tried with a few different versions so its not the editor is there some php configuration I need to make in order to get the post? Made a simple test page below with some sample code. as when i do a $_POST['mytextarea3'] as a plain textarea the php receives it fine. I hope this is the rite forum for posting this if not I do apologise as I feel this is a php related issue not with the actual library. <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <script language="JavaScript" type="text/javascript" src="/wysiwyg_beta/wysiwyg.js"></script> <script> function validate() { document.example.action="test.php"; document.example.submit(); } </script> </head> <body > <form name="example" method="POST" > <textarea id="mytextarea" name="mytextarea3" style="height: 200px; width: 500px;"> </textarea> <script language="javascript1.2"> generate_wysiwyg('mytextarea'); </script> <input type="button" id="button" value="postme" onclick="validate()"/> </form> </body> </html> <?php echo 'Debug 1:<br />'; echo '<pre>'; print_r($_POST['mytextarea3']); echo '</pre>'; ?> Link to comment https://forums.phpfreaks.com/topic/118348-php-with-wysiwyg-rich-editors-help/ Share on other sites More sharing options...
wildteen88 Posted August 6, 2008 Share Posted August 6, 2008 I don't know what wysiwyg editor you're using, however your should echo $_POST['mytextarea3'] within your textarea not outside it <textarea id="mytextarea" name="mytextarea3" style="height: 200px; width: 500px;"><?php echo $_POST['mytextarea3']; ?></textarea> Link to comment https://forums.phpfreaks.com/topic/118348-php-with-wysiwyg-rich-editors-help/#findComment-609536 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.