Dynadot โ€” .com Transfer

PHP/Mysql Help Needed

SpaceshipSpaceship
Watch
Impact
44
Hello,

I currently am using a WYSIWYG to turn:

blah

blah

into

blah<br><br>blah

It then saves to a mysql. Then when I try to grab the data it just shows up on the webpage as

blah<br><br>blah

Instead of


blah

blah

Any suggestions? I know there is htmlspecialchars_ decode but that is for php5 and I am using php4.

Thanks.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
On your WYSIWYG text editer do you have a codeing tab? if so add the <br><br> in their otherwise a quick way to do it with out knowing the code is just open it up in notepad and insert the <br><br> bit.
 
0
•••
PHP_Compat is your friend. ;) Although - html_entity_decode (PHP >= 4.3.0) will work.
 
0
•••
I hope the help from SecondVersion worked out. I have a recommendation though. I think it's better to store the text in the way it was entered, and change the newlines to <br>'s just before it gets displayed. It's more universal.

PS: make sure you use <br /> instead of <br> :)
 
0
•••
Thanks SV I will give that a try. mch, I am using openWYSIWYG and it was made to post <br> and not <br />, however I do know <br /> is better for echo statements, but I an just trying to make a variable be put onto a page from a mysql column (eg: $user["content"], shows table blog, column content).

Thanks.
 
0
•••
Dynadot โ€” .com TransferDynadot โ€” .com Transfer
Appraise.net
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back