CornishFlyer Posted April 9, 2012 Share Posted April 9, 2012 I'm not really sure where this would fit in, but I've got an issue that I simply can't resolve. This is my website here. The links on "The Facts" are inputted through PHPMyAdmin, stored as a longtext and then through SQL Querys are posted to the site, then when the link is clicked the content shows in the content area. However, how do I get formatting, like text on different lines, bold, underlined text, in PHPMyAdmin as it removes it all and puts it in one big block? http://southwestdesign.org.uk/SavePLH/ Any ideas appreciated please! Link to comment Share on other sites More sharing options...
dsonesuk Posted April 9, 2012 Share Posted April 9, 2012 ??? Only if you use a function such as strip_tags() to remove html code. Link to comment Share on other sites More sharing options...
CornishFlyer Posted April 9, 2012 Author Share Posted April 9, 2012 ??? Only if you use a function such as strip_tags() to remove html code. To be honest I'm not sure how to do that? What I want to be able to do is allow formatting, paragraphs in particular as at the moment it puts it in a single block. Link to comment Share on other sites More sharing options...
dsonesuk Posted April 9, 2012 Share Posted April 9, 2012 I use longtext and it has <em></em> to emphasise <strong></strong> to make text bold within it, and it does not get removed, you just have to be careful how you us single quotes or apostrophes, and double quotes id adding inline styling example <span syle='font-size: 18px;'> within the text with echo '<p>'.$table_column_code.'</p>'; will make it think the single quotes inside the code was part of the echo code that separates text from php code. Link to comment Share on other sites More sharing options...
CornishFlyer Posted April 9, 2012 Author Share Posted April 9, 2012 Hmm, not sure thats what I need to do. I've pasted below a screenshot of PHPMyAdmin, thats how I want the text to display in my site, but it doesn't, the other screenshot is how it shows; Link to comment Share on other sites More sharing options...
dsonesuk Posted April 9, 2012 Share Posted April 9, 2012 you will need to add html to create line breaks and any other styling you require, as in <strong>Content</strong> <br/>will <br/>be <br/>here. <br/><em>Content</em> <br/>will <br/>be <br/>here. Link to comment Share on other sites More sharing options...
CornishFlyer Posted April 9, 2012 Author Share Posted April 9, 2012 Your a legend, I didn't think that you could use HTML in PHP My Admin!!! Thank-you so much! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.