dealing with html (php)

Permabanned
Joined
3 Jul 2010
Posts
512
Hello.

I'm creating a script for creating wap sites - similar to geocities.

i grab my html from the database and pour it into a <textarea> for editing.

how do i stop that html messing up the html that makes up the editing page??

this is in PHP.
 
Try htmlentities.

PHP:
<textarea rows="30" cols="50">
<?php echo htmlentities($databaseHTML, ENT_QUOTES); ?>
</textarea>

This should work fine with HTML editors such as TinyMCE.
 
Try htmlentities.

PHP:
<textarea rows="30" cols="50">
<?php echo htmlentities($databaseHTML, ENT_QUOTES); ?>
</textarea>

This should work fine with HTML editors such as TinyMCE.

yeah that seems alright, though my app will be slightly less "all biz" than TinyMCE as it needs to be compatible with even the most basic mobile phones.




in response to the other fella, i can't see how commenting out the lot would give me anything other than a blank page when my <textarea> is supposed to be?
 
Back
Top Bottom