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
Post a Comment