random1 Posted September 16, 2008 Share Posted September 16, 2008 <form method="post"> <textarea name="page_content_editor" rows="20" cols="120"> <p>test content</p> </textarea> <br /> <input value="Update Content" name="button_update_content" type="submit"> </form> I have some code like the above that updates page content to a database in HTML format. I want my pages to validate but the validator I use complains about the <p>test content</p> bit being in the wrong place. Validator Message: Error: document type does not allow element "p" here Is there a way in HTML to make a section of text as being plaintext so this is not an issue? Quote Link to comment https://forums.phpfreaks.com/topic/124412-html-content-from-database/ Share on other sites More sharing options...
dropfaith Posted September 16, 2008 Share Posted September 16, 2008 are you trying to display code to users to copy?use the < as < and > as > <p> paragraph </p> crap nvm i read wrong hrmm i never really validate my admin section of sites Quote Link to comment https://forums.phpfreaks.com/topic/124412-html-content-from-database/#findComment-642675 Share on other sites More sharing options...
random1 Posted September 17, 2008 Author Share Posted September 17, 2008 hmm... does XHTML have an alternative to textarea that can contain HTML code that will validate correctly? Quote Link to comment https://forums.phpfreaks.com/topic/124412-html-content-from-database/#findComment-643586 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.