php - Textarea content to database -


i have textarea called personalinfos fill infos in following format :

<p><span class="white">1966 - '69</span><br/> text .... </p> 

when submit database, gets saved ok, same format. when retrieve code database admin textarea gets filled ok.

my problem on front end displayed code text not rendered html code. basiclly see on page :

<p><span class="white">1966 - '69</span><br/>   

you should have @ htmlspecialchars_decode()

example

$str = '<p><span class="white">1966 - \'69</span><br/> text .... </p>'; echo htmlspecialchars_decode($str); 

also make sure escape single quotes well.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -