214k views
0 votes
Investigate the functions available in PHP, or another suitable Web scripting language, to interpret the common HTML and URL encodings used on form data so that the values are canonicalized to a standard form before checking or further use.

User Normanius
by
5.2k points

1 Answer

3 votes

Answer:

Answer explained below

Step-by-step explanation:

Solution:

Some of the PHP functions used to interpret common HTML and URL encodings are as follows:

urlencode:

This function is used for encoding a string to be used in a query part of a URL and this is used as a convenient way to pass variables to the next page of a web form.

urldecode(): Same as urlencode() but in a reverse way. It is used to decode URL-encoded string

htmlentities(): This PHP function is used to convert all applicable characters to HTML entities

html_entity_decode(): This function converts HTML entities to characters and it is the reverse form of htmlentities() function.

User Himadri Ganguly
by
4.8k points