Jump to content

insert into mysql database: everything is in html


walnoot

Recommended Posts

Hi guys,

I have created a news system based on php and mysql.

now my problem is that when i fill in the form to insert de 'news' into my database, it inserts the text in 'html'-code.

[b]so what I mean is this:[/b]

this is what i type in my form to insert into the database: (for example)
[code]This is my new news post<br>
<br>
<br>
<b>Down down down</b><br>
<br>
<br>
Under :)[/code]

[b]And this is what i get when i read it from the database news table:[/b]
"This is my new news post


[b]Down down down[/b]


Under :)"


[b]NOW what i want to be able to do is i want to type this in my form (you see, without the html codes like '<br>'):[/b]
[code]This is my new news post


Down down down


Under :)[/code]

[b]and i want to get the same out of it:[/b]
"This is my new news post


Down down down


Under :)"

------------------------------------------------------------------------------------------------------------
[b]When I type this in the form now and i read it again from the database, i get this:[/b]
"This is my new news postDown down downUnder :)"

(no '<br>')


[img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /] hope you can help me
thanks
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.