PHP code like this one in the forum

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
new2phpcode
Forum Newbie
Posts: 21
Joined: Tue Oct 09, 2007 10:40 pm

PHP code like this one in the forum

Post by new2phpcode »

Hi,

im trying to create my blog using PHP and MySQL and i'm trying to create the same format(like in this forum) in which we enter the post in the "post a new topic" page but when i enter the data in Mysql, all formatting are lost. Is there a way on how to control the formatting? or is there a code that automatically enters the HTML code in mysql then when the data is pulled it is automatically formatted with tags? hope someone can give me an idea... Thanks!
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Re: PHP code like this one in the forum

Post by shiznatix »

Not quite sure what you mean. Do you mean that all the HTML that you put into the textarea is not saved into the database? If that is the case then you want to look for an offending strip_tags() function call.

If thats not what you mean please post some code and let us know exactly where the HTML is being lost.
new2phpcode
Forum Newbie
Posts: 21
Joined: Tue Oct 09, 2007 10:40 pm

Re: PHP code like this one in the forum

Post by new2phpcode »

something like the interface of the "post a reply" link in the forum, where there are buttons for bold, italic,etc...
i dont know the technique on how the datas pulled from the database are formatted when displayed on the page...
The spaces, commas, indentions etc.... when i insert the data from the textarea, all punctuations and formatting are lost so when i pull the data, all is just in a straight line without the formatting... sorry for my english... :)

posting.php?mode=reply&f=1&t=85729
new2phpcode
Forum Newbie
Posts: 21
Joined: Tue Oct 09, 2007 10:40 pm

Re: PHP code like this one in the forum

Post by new2phpcode »

i think i've found what i am looking for...

http://us.php.net/wordwrap
Post Reply