NEW
Font size
Worksheetsdfc50193-6B-chapter1,2
Total questions: 15
Worksheet time: 8mins
What does PHP acronym stand for?
Protocol Hyperscript Processor
PHP Hyperscript Processor
Protocol Hypertext Preprocessor
PHP Hypertext Preprocessor
Get the length of the string "Hello World!".
Leng
substring
strlen
len
Write a correct syntax to include a file named "footer.php".
include ("footer.php");
import("footer.php");
required("footer.php");
export("footer.php");
What is the correct way to end a PHP statement?
New Line
</php>
;
.
When using the POST method, variables are displayed in the URL:
True
False
How do you create a cookie in PHP?
setcookie()
makecookie()
createcookie()
Identify the type of SQL that were used to manipulate database structures, including tables.
Data Manipulation Language (DML)
Data Definition Language (DDL)
Database Management System (DBMS)
Structured Query Language (SQL)
Determine the CORRECT query used to sort the data that retrieves all the records from student table and lists them by class in ascending order.
SELECT * FROM student ORDER class;
SELECT * FROM student ORDER BY class;
SELECT * FROM student ORDER BY ‘class’;
SELECT * FROM student SORT BY class;
Create a session variable named "favcolor".
$session["favcolor"] = "green";
$_SESSION["favcolor"] = "green";
$_SESSION["favcolor"] ["green"];
$SESSION["favcolor"] ="green";
Which method is more secure send the data to server
post
get
request
none
PHP is executed on
The Server
The Browser
The Website
The Machine
We create re-usable code blocks by placing them inside?
Variables
Parameters
Code Blocks
Functions
Sometimes we only want certain code to execute if a condition is true. How do we test for that?
Loop
If Statement
Integer
Variable
PHP server scripts are surrounded by delimiters, which?
<?php...?>
<?php>...</?>
How do you create an array in PHP?
$cars = "Volvo", "BMW", "Toyota";
$cars = array("Volvo", "BMW", "Toyota");
$cars = array["Volvo", "BMW", "Toyota"];
