wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Module 5 & Module 6

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

PHP server scripts are surrounded by delimiters, which?

a)

<?php...?>

b)

<&>...</&>

c)

<?php>...</?>

d)

<script>...</script>

2.

How do you write "Hello World" in PHP

a)

echo "Hello World";

b)

"Hello World";

c)

Document.Write("Hello World");

3.

All variables in PHP start with which symbol?

a)

$

b)

!

c)

&

4.

How do you get information from a form that is submitted using the "get" method?

a)

$_GET[];

b)

Request.QueryString;

c)

Request.Form;

5.

What is the correct way to add 1 to the $count variable?

a)

$count++;

b)

++count

c)

count++;

d)

$count =+1

6.

Which one of these variables has an illegal name?

a)

$my-Var

b)

$myVar

c)

$my_Var

7.

With SQL, how do you select a column named "FirstName" from a table named "Persons"?

a)

SELECT FirstName FROM Persons

b)

EXTRACT FirstName FROM Persons

c)

SELECT Persons.FirstName

8.

With SQL, how can you insert a new record into the "Persons" table?

a)

INSERT INTO Persons VALUES ('Jimmy', 'Jackson')

b)

INSERT ('Jimmy', 'Jackson') INTO Persons

c)

INSERT VALUES ('Jimmy', 'Jackson') INTO Persons

9.

How can you change "Hansen" into "Nilsen" in the "LastName" column in the Persons table?

a)

UPDATE Persons SET LastName='Nilsen' WHERE LastName='Hansen'

b)

UPDATE Persons SET LastName='Hansen' INTO LastName='Nilsen'

c)

MODIFY Persons SET LastName='Hansen' INTO LastName='Nilsen

d)

MODIFY Persons SET LastName='Nilsen' WHERE LastName='Hansen'

10.

With SQL, how can you delete the records where the "FirstName" is "Peter" in the Persons Table?

a)

DELETE FROM Persons WHERE FirstName = 'Peter'

b)

DELETE FirstName='Peter' FROM Persons

c)

DELETE ROW FirstName='Peter' FROM Persons