PdfPrep.com

How should you develop the form?

HOTSPOT

You are developing a form that captures a user’s email address by using HTML5 and jQuery.

The form must capture the email address and return it as a query string parameter. The query string parameter must display the @ symbol used in the email address.

You need to implement this functionality.

How should you develop the form? (To answer, select the appropriate options from the drop-down lists in the answer area.)

Answer:

Explanation:

* serialize ()

Encode a set of form elements as a string ready for submission.

decodeURIComponent

* To decode the string, PHP offers the urldecode() function.

?

echo urldecode(‘name%40website.com’); //restores "name@website.com"

Reference: JavaScript decodeURIComponent() Function

Exit mobile version