[SOLVED] Help displaying HTML tags

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
waboo386
Forum Newbie
Posts: 6
Joined: Sun Aug 03, 2003 9:15 pm

Help displaying HTML tags

Post by waboo386 »

Hi

I have written a content management system for my website, ChristianChapel.net, and I need a little help. The way that I add and edit pages (which go into a mySQL database) is through forms on HTML pages. There is generally no problem with this, despite the fact that I never modify the data being entered into the textareas--what is typed in goes directly into the database.

However, when I add a page with a FORM for the content (i.e. http://www.christianchapel.net/robsCMS/read.php?id=108) a problem arises when I go back to edit the page. For some reason or another, the browser will terminate the form that is editing the content at the end of the INPUTTED form, and NOT the end of the page that I'm currently working on. Sorry if that's hard to follow.

I guess what it all boils down to this question: how can I convert something like this when withdrawing data for editing from the database:

<img>

into:

< img >

and vice versa when the info is put back into the database.

I'm assuming there's a function that would do this in PHP but I have no idea where to look in the function reference...I just don't know what all of this is called!!

Thanks a lot

Rob
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

[php_man]htmlentities[/php_man]($string, ENT_QUOTES);
waboo386
Forum Newbie
Posts: 6
Joined: Sun Aug 03, 2003 9:15 pm

Post by waboo386 »

Wow thanks. That was quick. But you got it :D
Post Reply