wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Post-Test AJAX - PHP

Total questions: 15

Worksheet time: 21mins

Name
Class
Date
1.

If a condition has two choices, namely true and false, then the syntax used is ...

a)

IF

b)

IF ... ELSE

c)

IF - IF .. ELSE - ELSE

d)

SWITCH

2.

A PHP program will display the name of the month when entering a number between 1 and 12 in the input form. The use of the right branching is ...

a)

IF

b)

IF ... ELSE

c)

IF - IF .. ELSE - ELSE

d)

SWITCH

3.

From the following program, the final score displayed is…

a)

9

b)

10

c)

90

d)

100

4.

The program below is used to display numbers 1 - 5. Complete the PHP code in the black box below.

4 lines
5.

The right syntax used to stop a loop when a condition occurs and continue the next loop is ...

a)

WHILE

b)

DO ... WHILE

c)

BREAK

d)

CONTINUE

6.

PHP is a server-side programming, where the code will be executed on the server side. The following which one can act as a server on a local computer ...

a)

XAMPP

b)

HTDOCS

c)

APACHE

d)

MYSQL

7.

The following is not a way of writing PHP code in HTML is ...

a)

<? dan ?>

b)

<?php dan ?>

c)

<script language=”php”> dan </script>

d)

<$ dan $>

8.

Which is the wrong way to write variables in PHP?

a)

$name

b)

$_address

c)

$1student

d)

$school?

9.

Which operator is used to calculate the modulo?

a)

*

b)

/

c)

+/

d)

%

10.

The program below is used to display the numbers 2,4 and 6 where each array element will be multiplied by the number 2. Complete the PHP code in the following black box.

4 lines
11.

Write the output of the following PHP program.

4 lines
12.

What is not an advantage of Jquery ...

a)

Resolved inter-browser compatibility issues

b)

Speed ​​up form processing

c)

Simple code

d)

Complete documentation

13.

The function in JQuery that is used to ensure all the desired elements are displayed on the web page is ...

a)

document ready()

b)

document complete()

c)

document all()

d)

document display()

14.

The functions provided by JQuery to hide elements are ...

a)

fadeOut

b)

fadeIn

c)

fadeToggle

d)

fadeSlow

15.

Which is an AJAX function?

a)

can load data from the server to a web browser without reloading (refreshing)

b)

make code more concise

c)

add style to the web page

d)

create slide animations