Jump to content

Can't get nicedit to work


pneudralics

Recommended Posts

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
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.