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

Archived

This topic is now archived and is closed to further replies.

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