wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

php-get,post,session ,cookie

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

In PHP, cookies are set by using the

a)

setcookie() function

b)

set() function

c)

cookie_set() function

2.

A period of time during which a particular person, views a number of web pages at a particular machine is called as a

a)

session

b)

cookie

c)

parsing

3.

Name, value, expire, path, httponly, domain, secure all of these are arguments of

a)

session()

b)

cookie()

c)

setcookie()

4.

To initiate a session which function is used?

a)

start()

b)

session_start()

c)

session_str()

5.

f you want to free all variables in a session, which function you can use

a)

session_destroy()

b)

session_unset()

c)

set()

6.

When you use the $_GET variable to collect data, the data is visible to..

a)

none

b)

everyone

c)

only you

7.

When you use the $_POST variable to collect data, the data is visible to..

a)

noone

b)

every one

c)

only you

8.

Which two predefined variables are used to retrieve information from forms?

a)

$GET & $POST

b)

$_GET & $_POST

c)

&_GET & &_POST

9.

Which of the following method is suitable when you need to send larger form submissions?

a)

GET

b)

POST

c)

BOTH

10.

A cookie is often used to identify a

a)

USER

b)

BROWSER

c)

WEB PAGE

11.

5. Which is a small file that the server embeds on the user's computer

a)

SESSION

b)

COOKIE

c)

FILE

12.

A session starts with the function

a)

session()

b)

session_strt()

c)

session_start()

13.

Session variables are set with the PHP global variable

a)

$SESSION[]

b)

$_SESSION[]

c)

&SESSION

14.

In POST method the results at a given moment cannot be

a)

SAVED

b)

MOVE

c)

BOOKMARKED

15.

If the directive session.cookie_lifetime is set to 3600, the cookie will live until ____________

a)

3600 sec

b)

3600 mint

c)

3600 hrs