Vidyalelo
PHP · all questions

HTML Forms Handling
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

70

Questions

3/4

Page

Pick an option on a question to see the right answer and solution.

Which function is used to erase all session variables stored in the current session?

Select an option to see the answer and solution.

What will the function session_id() return is no parameter is passed?

Select an option to see the answer and solution.

Which one of the following statements should you use to set the session username to Nachi?

Select an option to see the answer and solution.

What will be the output of the following PHP code? Say your previous session username was nachi.
<?php
unset($_SESSION['username']);
printf("Username now set to: %s", $_SESSION['username']);
?>

Select an option to see the answer and solution.

An attacker somehow obtains an unsuspecting user’s SID and then using it to impersonate the user inorder to gain potentially sensitive information. This attack is known as.

Select an option to see the answer and solution.

Which parameter determines whether the old session file will also be deleted when the session ID is regenerated?

Select an option to see the answer and solution.

Which function effectively deletes all sessions that have expired?

Select an option to see the answer and solution.

Which function is used to transform PHP’s session-handler behavior into that defined by your custom handler?

Select an option to see the answer and solution.

The session_start() function must appear.

Select an option to see the answer and solution.

What is the return type of session_set_save_handler() function?

Select an option to see the answer and solution.

Before you can start processing images with PHP, you must first add the ability to upload images to your administrative form on ________

Select an option to see the answer and solution.

When you’re uploading files you need to set the enctype of the form to __________

Select an option to see the answer and solution.

To check whether a file was uploaded, you look in the _______ superglobal array.

Select an option to see the answer and solution.

To make the ImageHandler class portable you should create a separate file for it called __________

Select an option to see the answer and solution.

DocBlocks are indicated by opening a comment using _________

Select an option to see the answer and solution.

To process the file, you need to break the array from $_FILES into individual values. You can do this using the ________ function.

Select an option to see the answer and solution.

Before you try to process the file, you need to make sure that your $err value is equivalent to _________

Select an option to see the answer and solution.

You use the $_SERVER superglobal and your _______ property to create your path to check.

Select an option to see the answer and solution.

Which function do you have to use to check whether the $path you’ve stored exists?

Select an option to see the answer and solution.

Which one of the following is true about the following line – $obj = new ImageHandler(‘/images/’, array(400, 300));

Select an option to see the answer and solution.