Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

web 16,17

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.
In PHP _________ is a packet of information sent from the server to client, and then sent back to the server each time it is accessed by the client.
a)
session
b)
profile
c)
database
d)
cookie
2.
In PHP cookies are sent from the server to the client via ________ headers.
a)
Get-Cookie
b)
Set-Cookie
c)
Sent-Cookie
d)
Request-Cookie
3.
To access a cookie received from a client _________ superglobal array is used in PHP.
a)
$_COOKIE
b)
$_REQUESTCOOKIE
c)
$_GETCOOKIE
d)
$_SETCOOKIE
4.
In PHP setcookie() the _____ data string defines the life time.
a)
time
b)
End time
c)
Expire
d)
Last time
5.
In PHP setcookie()the _____ definesdata stored in the file
a)
value
b)
time
c)
Expire
d)
data
6.
In PHP ________ works by creating a unique id (UID) for each visitor and storing variables based on this UID.
a)
session
b)
profile
c)
database
d)
cookie
7.
In PHP to store user data in session _______ array is used.
a)
$_SESSION
b)
SYS_SESSION
c)
$SESSION
d)
$_SESSIONS
8.
To start a PHP session _______ in PHP is used.
a)
session_start()
b)
PHP_session_start()
c)
PHP_start()
d)
start()
9.
Which of the following is used to access session variables in PHP?
a)
session_start()
b)
$_SESSION[]
c)
isset()
d)
start()
10.
In PHP MySqlDatabase can be created by using the ____________ command
a)
create database
b)
use databases
c)
show databases
d)
view databases
11.
To list all databases on the sql server _______ is used.
a)
list databases
b)
use databases
c)
show databases
d)
view databases
12.
In PHP to see all the tables in theMySql database _______ is used.
a)
list tables
b)
use tables
c)
show tables
d)
view tables
13.
In PHP to create a connection object for MYSQL ___________ is used.
a)
mysql_connection
b)
db_connection
c)
db_connect
d)
mysql_connect
14.
To select the MySqldatabase in PHP ________ is used.
a)
mysql_db
b)
select_db
c)
mysql_select_db
d)
mysql_select
15.
To read theMySql table in PHP________ is used.
a)
mysql_array
b)
mysql_fetch_array
c)
mysql_query
d)
mysql_fetch_query
16.
To extract the records from the MySqldatabase table _______ function is used in PHP.
a)
mysql_array
b)
mysql_fetch_array
c)
mysql_query
d)
mysql_fetch_query
17.
MySqlDatabase connection can be closed by using _______ in PHP.
a)
mysql_close
b)
sql_close
c)
db_close
d)
mysql_db_close
18.
In PHP which of the following is used to insert the MySql table?
a)
INSERT TABLE INTO table_name(column1,column2, …) VALUES (value1,value2…)
b)
INSERT INTO TABLE table_name(column1,column2, …) VALUES (value1,value2…)
c)
INSERT INTO table_name(column1,column2, …) VALUES (value1,value2…)
d)
INSERT TABLE table_name(column1,column2, …) VALUES (value1,value2…)
19.
In PHP which of the following is used to update the MySql table?
a)
UPDATE table_name SET column1=value 1,column2=value2, … WHERE condition
b)
UPDATE INTO table_name SET column1=value 1,column2=value2, … WHERE condition
c)
UPDATE INTO table_name column1=value 1,column2=value2, … WHERE condition
d)
UPDATE table_name SET column1=value 1,column2=value2, …
20.
In PHP which of the following is used to delete the MySqlrecords?
a)
DELETE FROM table_name WHERE column_name=value
b)
DELETE FROM TABLE table_name WHERE column_name=
c)
DELETE table_name WHERE column_name=value
d)
DELETE column_name=value FROM table_name