PHP Forms
- To validate an email address, which flag is to be passed to the function filter_var()?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
FILTER_VALIDATE_EMAIL
- What will be the value of the variable $input in the following PHP code?
<?php
$input = "Ajit<td>Gupta</td>you are really<i>Handsome</i>!";
$input = strip_tags($input,"<i></i>");
?>
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
Italic tags <i></i> might be allowable, but table tags <td></td> could potentially wreak havoc on a page.
- Which function is used to remove all HTML tags from a string passed to a form?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
strip_tags()
- Which one of the following should not be used while sending passwords or other sensitive information?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
Because the data is visible to everyone.
- Which variable is used to collect form data sent with both the GET and POST methods?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
$_REQUEST