Font size
WorksheetsCS 316 - Web Systems and Technologies 2( Midterm Exam)
Total questions: 21
Worksheet time: 30mins
When a client requests a web page, what software is used as a tool?
Web Browser
Web Server
Website
Web Content
What is a scripting language designed specifically for use on the web. It has features to aid you in programming the tasks needed to develop dynamic web applications?
Javascript
PHP
HTML
CSS
Which of the these statements is not true?
The web server continues in HTML mode until it encounters a PHP opening tag (<?php).
The web server starts scanning the file in HTML mode. It assumes the statements are HTML and sends them to the browser without any processing.
The web server continues in PHP mode until it encounters a PHP closing tag (?>).
None of the above.
(a) are containers used to hold information.
Which of these statements were the rule of declaring variable in PHP?
All variable names have a dollar sign ($) in front of them. This tells PHP that it is a variable name.
Variable names must begin with a letter or an underscore. They cannot begin with a number.
Variable names can be any length.
Variable names can include letters, numbers, and underscores only.
All of the above
(a) are a series of instructions in a file named with an extension that tells the web server
What are expressions that PHP tests or evaluates to see whether they are true or false. Conditions are used in complex statements to determine whether a block of simple statements should be execute ?
Loopings
Conditions
Arithmetic
Functions
What statement tests conditions, executing a block of statements when a condition is true?
(a)
What statement are used frequently in scripts to set up a block of statements that repeat?
Conditional
Function
Loop
Arithmetic
Which of the following is not a loop statement?
for loop
while loop
do..while loop
beef loop
How many records are in this database?
8
5
9
12
What is the primary key in this database?
Emp_Id
Last Name
Gender
Title
Which SQL statement is used to extract data from a database?
OPEN
GET
EXTRACT
SELECT
Which SQL statement is used to delete data from a database?
COLLAPSE
DELETE
REMOVE
DROP
Which SQL statement is used to update data in a database?
SAVE
SAVE AS
UPDATE
MODIFY
Which of the following scripts will run successfully?
SELECT customer name FROM customers;
SELECT FROM `customers` 'customer name';
SELECT `customer name` FROM customers ORDER BY zone WHERE cat_id = 12;
SELECT `customer name` FROM customers WHERE cat_id = 12 ORDER BY cat_id;
SELECT * FROM sales WHERE amount > 200.
the query will display all the sales records with amounts starting from 200 and above
the query will display all the sales records with amounts less than 200
the query will display all the sales records with amounts greater than 200
the query will output sales records with the amount equal to 200.
Which will input data into a table?
INSERT INTO table(name, height, weight) VALUES('strand', '6ft 2in', '165')
INPUT INTO table(name, height, weight) VALUES('strand', '6ft 2in', '165')
INSERT INTO table CATEGORIES(name, height, weight) VALUES('strand', '6ft 2in', '165')
INSERT INTO table CATEGORIES(name, height, weight) ('strand', '6ft 2in', '165')
If I want to show all data in a MySQL table, I would use
SHOW * FROM table;
SELECT * FROM table;
SHOW * IN table;
SELECT * IN table;
Write the command to connect MYSQL database to PHP.
write down the php code to Reverse a given integer number
Given:
54869
Expected output:
96845
