Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

FSWD (Jquery, PHP, MySql)

Total questions: 52

Worksheet time: 39mins

Name
Class
Date
1.

What does PHP stands for?

a)

PHP: Hypertext Preprocessor

b)

Private Home Page

c)

Personal Hypertext Processor

2.

Which among the following is the correct delimiters that surround PHP server scripts?

a)

<?php>...</?>

b)

<script>...</script>

c)

<?php...?>

d)

<&>...</&>

3.

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

a)

Request.QueryString;

b)

$_GET[];

c)

Request.Form;

4.

When using the POST method, variables are displayed in the URL:

a)

True

b)

False

5.

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

a)

$count =+1

b)

$count++;

c)

++count

d)

count++;

6.

How do you create an array in PHP?

a)

$cars = "Volvo", "BMW", "Toyota";

b)

$cars = array["Volvo", "BMW", "Toyota"];

c)

$cars = array("Volvo", "BMW", "Toyota");

7.

How is PHP written into a webpage?

a)

Just like other html tags: <php> </php>

b)

Only in a separate file which is linked to the html page

c)

Using curled brackets {php} {/php}

d)

A PHP script starts with <?php and ends with ?>

8.

PHP script is parsed....

a)

On the client's web browser

b)

On the server where the website is hosted

c)

On the client's CPU

d)

On the Internet

9.

PHP is case sensitive in what way?

a)

It's never case sensitive, don't worry about it.

b)

Only when referring to variables

c)

When referring to classes, functions or variables

d)

All the time!

10.

When concatenating strings, you use what symbol in PHP?

a)

A comma ,

b)

A plus sign +

c)

a hyphen -

d)

a full stop .

11.

Which statement can be used to select the database?

a)

$mysqli=select_db('databasename');

b)

mysqli=select_db('databasename');

c)

mysqli->select_db('databasename');

d)

$mysqli->select_db('databasename');

12.

The updated MySQL extension with PHP5 is typically referred to as

a)

MySQL

b)

mysql

c)

mysqli

d)

mysqly

13.

Which method returns the error code generated from the execution of the last MySQL function?

a)

errno()

b)

errnumber()

c)

errorno()

d)

errornumber()

14.
A relational database  ___________ is a data structure used to store and organize information.
a)
View
b)
Table
c)
Report
d)
Stored Procedure
15.
What is the maximum size of the VARCHAR Column type?
a)
255 char
b)
255 Byte
c)
512 Char
d)
512 Byte
16.
MySQL is
a)
A Programming language
b)
A technique for writing reliable programs
c)
 A Relational Database Management System
d)
None of the Above
17.
What SQL clause is used to restrict the rows returned by a query?
a)
AND
b)
WHERE
c)
HAVING
d)
FROM
18.

If I want to show all data in a MySQL table, I would use

a)

SHOW * FROM table;

b)

SELECT * FROM table;

c)

SHOW * IN table;

d)

SELECT * IN table;

19.

Which of the following is used to retrieve data from a MySQL database?

a)

mysqli_fetch_all()

b)

mysql_fetch_all()

c)

pdo_fetch_all()

d)

mysqli_query()

20.

Which of the following is used to establish a connection to a MySQL database?

a)

mysqli_connect()

b)

mysql_connect()

c)

pdo_connect()

d)

sql_connect()

21.

Which of the following is used to close a connection to a MySQL database?

a)

mysqli_close()

b)

mysql_close()

c)

pdo_close()

d)

sql_close()

22.

Which of the following is used to retrieve the number of rows in a result set?

a)

) mysqli_num_rows()

b)

mysql_num_rows()

c)

pdo_num_rows()

d)

sql_num_rows()

23.

Which of the following is used to escape special characters in a string before inserting it into a MySQL database?

a)

mysqli_escape_string()

b)

mysql_escape_string()

c)

pdo_escape_string()

d)

sql_escape_string()

24.

The MySQLi extension, the 'i' stands for __________.

a)

impress

b)

improved

c)

initial

25.

What software that you need to make PHP project?

a)

NetBeans & C++

b)

NetBeans & XAMPP

c)

Java & XAMPP

26.

Where is your PHP project file located?

a)

C:\xampp\htdocs\

b)

C:\xampp\project\

c)

D:\xampp\htdocs\

27.

The 2 basic ways to get output in PHP are __________.

a)

echo and cout

b)

echo and scan

c)

echo and print

28.

Can PHP read html and CSS file?

a)

YES

b)

NO

29.

Which one of the following statements is used to create a table?

a)

CREATE TABLE table_name (column_name column_type);

b)

CREATE table_name (column_type column_name);

c)

CREATE table_name (column_name column_type);

d)

CREATE TABLE table_name (column_type column_name);

30.

If there is no error, then what will the error() method return?  

a)

TRUE

b)

FALSE

c)

Empty String

d)

0

31.

Which commands perform operation on database?

a)

Insert

b)

Update

c)

Select

d)

Delete

32.

Which is not a relational database management system?

a)

MySql

b)

IBM DB2

c)

Oracle

d)

Windows

33.

The combination of ____ and ______has become very popular server side web scripting language in Internet.

a)

PHP, HTML

b)

HTML, CSS

c)

PHP, MYSQL

d)

HTML, Javascript

34.

MySQL database connectivity and management are performed through _______

a)

mysqli_connect()

b)

mysqli_close()

c)

mysqli_query()

d)

All the above

35.

Which function is used to connect to MySql database?

a)

mysqli_connect()

b)

mysqli_close()

c)

mysqli_query()

d)

$con

36.

mysqli_connect() function requires (a)   parameters.

37.

What are the parameters used to database connnection?

a)

Database Server name

b)

Username

c)

Password

d)

Database name

38.

_______ helps to execute the SQL query statements in PHP scripting language

a)

mysqli_connect()

b)

mysqli_close()

c)

mysqli_query()

d)

mysqli_connect_error()

39.

A (a)   is a computer or a device that provides functionality for other programs or devices, called “clients”.

40.

Which of the following ways is correct JQuery Event Syntax ?

a)

$("p").click(function(){

// action goes here!! });

b)

$("p").openALl(function(){}

c)

None of the above

41.

With jQuery, you can hide and show HTML elements with the hide() and show() methods?

a)

True

b)

False

42.

Which of the following is the correct syntax of toggle() effects in JQuery?

a)

$("button").click(function(){

$("p").toggle(); });

b)

.("p").toggle();

c)

None of the above

43.

Look at the following selector: $("div"). What does it select?

a)

First div element

b)

all div element

c)

None of the above

44.

Is jQuery a library for client scripting or server scripting?

a)

Client Scripting

b)

Server Scripting

c)

None of the above

45.

With jQuery, look at the following selector: $("div.intro"). What does it select?

a)

First Div elements with class="intro"

b)

All div elements with class="intro"

c)

None of the above

46.

What is the correct jQuery code for making all div elements 100 pixels high?

a)

$("div").height(100)

b)

&("div").height('100')

c)

$("div").high(“100”)

47.

Which jQuery function is used to prevent code from running, before the document is finished loading?

a)

$(document).onload()

b)

$(document).ready()

c)

None of the above

48.

Which of the following is the correct syntax to Set CSS in JQuery?

a)

$("p").css("background-color="yellow");

b)

$("p").css("backgroundcolor", "yellow");

c)

$("p").css("background-color", "yellow");

49.

jQuery provides several methods such as filter(), first(), last(), eq(), slice(), has(), not(), etc.?

a)

True

b)

False

50.

When would the following code be run


$(function() {});

a)

When the user requests the page

b)

When the user pushes a button

c)

After all the elements are loaded

d)

Never

51.

Which of the following is selected by $('.foo')?

a)

<p>Foo</p>

b)

<img id='foo'></img>

c)

<div class='foo'></div>

d)

<foo></foo>

52.

Which of the following is selected by $('#bar')?

a)

<div class='bar'></div>

b)

<p data-bar='bar'></p>

c)

<h1>bar</h1>

d)

<img id='bar'></img>