Jump to content

Sending data in plain from database to view page problem


karubum

Recommended Posts

I am using CKEditor to send data into my "news" table in news database. When I send it, the data is as follow:

 

<table>

<tr>

<td>This is a sample news</td>

</tr>

</table>

 

When I try to send this data to the view page with:

 

<? echo $news_data; ?>

 

it shows my data with source code:

 

<table>

<tr>

<td>This is a sample news</td>

</tr>

</table>

 

I want to show my data with tags as it does above (<table>...</table>) instead I want just "This is a sample news".

 

What should I do?

 

 

Link to comment
Share on other sites

You need to get the information from the ckeditor object and pass it to the textarea, its a odd beast this editor, here's one i used on a site, you should be able to work out what is going on, curator_mission_english is the name of my text area

function checksubmit()
{
if (CKEDITOR.instances.curator_mission_english) 
{
	document.getElementById('curator_mission_english').value=CKEDITOR.instances['curator_mission_english'].getData();
}

if (CKEDITOR.instances.curator_mission_french) 
{
	document.getElementById('curator_mission_french').value=CKEDITOR.instances['curator_mission_french'].getData();
}

}

Link to comment
Share on other sites

Jason, for one, this isn't even your topic!! Secondly, my response to the OP was probably one of my most polite, so it's very odd that you're freaking out about it. If the OP has a problem he can probably handle it himself. Thirdly, if you can't handle someone correcting your spelling, you're going to have a hard time with this whole internet thing.

 

Please refrain from using language like that.

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.