pneudralics Posted October 31, 2008 Share Posted October 31, 2008 I can't get nicedit to show in my textareas. I also tried tinymce and couldn't do it either. The below is currently what I have. <?php //This is the page for updating the contactus section session_start(); if(!isset($_SESSION['username'])){ require ("error.php"); } else { include ('header.php'); ?> <script src=”<?php echo 'http://localhost/nicEdit.js'; ?>” type=”text/javascript”></script> <script type=”text/javascript”> bkLib.onDomLoaded(nicEditors.allTextAreas); </script> <table width="800" align="center"> <tr> <td align="center"> This section updates the contactus section. Clicking on the save button will override the current Contact Us information. </td> </tr> </table> <br /> <table width="800" align="center"> <tr> <td align="center"> <?php //Update contactus if (isset ($_POST['submit'])) { $contactus = ($_POST['contactus']); $contactus = trim(htmlentities($contactus)); if ( !empty ($contactus) ) { //Update... $updatecontactus = "UPDATE contactus SET contactus=\"$contactus\""; $updatecontactusresult = mysql_query ($updatecontactus); echo '<font color="red">Contact Us section has been updated.</font><br /><br />'; } else { echo '<font color="red">Contact Us section is empty.</font><br /><br />'; } } ?> [<a href="../contactus.php" target="_blank">View Contact Us Section</a>] <br /> <br /> <b>Update Contact Us Section Below</b> <br /> <form method="post" action="contactus.php"> <textarea name="contactus" cols="40" rows="20"> <?php //Retrieve contactus info $contactusselect = "SELECT * FROM contactus"; if ($contactusresult = mysql_query ($contactusselect)) { while ($row = mysql_fetch_array ($contactusresult)) { $contactus = $row['contactus']; } } echo "$contactus"; ?> </textarea> <br /> <br /> <input type="submit" name="submit" value="Save" /> </form> </td> </tr> </table> <?php }//End session else ?> Quote Link to comment https://forums.phpfreaks.com/topic/130882-cant-get-nicedit-to-work/ 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.