php - Do I need to encode my $_GET URL? -
php - Do I need to encode my $_GET URL? -
when first submit search form via $_get returns results expected when using pagination , submitting 1 time again page x see converts portion of url , fails.
here before , after url portion changing:
// before min_score=1&max_score=10¬_scored=1 // after min_score=1&max_score=10%ac_scored=1
it's encoding 10& how can prevent happening?
the reason ¬
gets intepreted browser ¬
. strict mode or doctype might help.
and ¬
gets substituted ¬
then. in turn becomes %ac
in request urls.
besides urlencode()
on individual values should additionally apply htmlspecialchars()
on whole url before add together <a>
tag.
php html
Comments
Post a Comment