CS 334 Quiz 2



CS 334 Quiz 2 Name_____________________________________

1. What is PHP?

a. A scripting language that can convert your web site from a static document to an interactive application.

b. A scripting language that can convert your web site from a dynamic document to a static informational document.

c. An html language that can be used for creating functions and reading form input.

d. An extension of JavaScript used to create dynamic web sites.

2. Three ways to indicate PHP in the code

a. Easiest was but not always works.

b. ____________________________________________

c. Finally, with an HTML tag code goes here

3. Create a PHP variable called “pizza” __________________________.

4. A PHP variable name can start with a letter, or “_” T or F

5. Unlike JavaScript, at the end of each PHP code line instruction there needs to be a

a. Colon

b. Semi-colon

c. Curly bracket

d. Parentheses

6. Create a multi-line variable and value for a return address

___________________________

___________________________

___________________________

___________________________

___________________________

7. List the syntax for a PHP function that has NO arguments ________________________________

8. Operators such as ==, , != = are referred to as

a. Assignment operators

b. Comparison operators

c. PHP math operators

d. Random operators

9. List the syntax for a “for” loop in PHP _______________________________________________

10. Create a piece of PHP code that will print out the product of a variable that has a value 2 and another variable that has the value of 4.

11. What is the SQL command for querying the entire table? (table named student)

________________________________________________________

12. What is the SQL command for querying the entire table and selecting only seniors? (table named student, fields are: fname, lname, address, class, major)

________________________________________________________________

13. What is the SQL command for inserting the following record into at database (table named student, fields are: fname, lname, address, class, major)

John Smith 425 Main Street senior history

14. What is the SQL command for querying the entire table and selecting only senior history majors? (table named student, fields are: fname, lname, address, class, major)

15. What is the SQL command for querying the entire table and selecting and displaying ALL the students last names? (table named student, fields are: fname, lname, address, class, major)

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download