Home »

How To Protect Special Characters in Query String?

Question ListCategory: PHPHow To Protect Special Characters in Query String?
adamemliy16 author asked 8 years ago
1 Answers
jeanderson295 author answered 8 years ago

If you want to include special characters like spaces in the query string, you need to protect them by applying the urlencode() translation function. The script below shows how to use urlencode():“);
print(“

Please click the links below”.” to submit comments about TECHPreparation.com:

“);
$comment = “I want to say: “It’s a good site! :->””;$comment = urlencode($comment);
print(“

“.”“”.””It’s an excellent site!

“”);

Please login or Register to Submit Answer