Yes, we use the urlencode() function to be able to protect special characters. Post navigation What is the difference between ereg_replace() and eregi_replace()? What are the three classes of errors that can occur in PHP?