Advamax Posted May 22, 2012 Share Posted May 22, 2012 Hi guys, I searched the web for solutions, but no luck for my case so far. I have a custom CMS that uses tinymce and input text boxes in a form. The tinymce textarea as well as the input text boxes pull the current data from the database, and allows the user to change it, from where the changes are passed on to be updated in the database. All input text boxes work 100%, except for the tinymce textarea. It keeps on passing the original data that was pulled from the database, and not the changed data. The form (simplified): <form enctype="multipart/form-data" method="post" action="page_update.php"> Button Name: <input type="text" name="btn_name" style="width:150px" value="<?php echo $current_link;?>"><br> Content: <textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 80%"> <?php echo $current_content; ?> </textarea> <input type="hidden" name="pid" value="<?php echo $page_id; ?>"> <input type="submit" name="save" value="Submit" /> <input type="reset" name="reset" value="Reset" /> </form> The php code (simplified): $upd_name = $_POST["btn_name"]; $upd_content = $_POST["elm1"]; $upd_pid = $_POST["pid"]; echo "Content = ".$upd_content; mysql_query("UPDATE pages SET Content='$upd_content', Link='$upd_name' WHERE ID=".$upd_pid); With the "echo" line I can see that the changed data wasn't passed, but the original data from the database. All my input text boxes works just fine. I have checked my code that the data isn't pulled from the database again somewhere between the form and the update code, and that is ruled out. For what it is worth, I have previously done something similar, except for that the form (with tinymce textarea) displayed in a javascript popup window, and the changed data was sent correctly. Any ideas? Thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/262907-tinymce-textarea-content-not-updating/ Share on other sites More sharing options...
Advamax Posted May 22, 2012 Author Share Posted May 22, 2012 Don't worry...problem solved. Quote Link to comment https://forums.phpfreaks.com/topic/262907-tinymce-textarea-content-not-updating/#findComment-1347600 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.