WorksheetsFSWD (Jquery, PHP, MySql)
Total questions: 52
Worksheet time: 39mins
What does PHP stands for?
PHP: Hypertext Preprocessor
Private Home Page
Personal Hypertext Processor
Which among the following is the correct delimiters that surround PHP server scripts?
<?php>...</?>
<script>...</script>
<?php...?>
<&>...</&>
How do you get information from a form that is submitted using the "get" method?
Request.QueryString;
$_GET[];
Request.Form;
When using the POST method, variables are displayed in the URL:
True
False
What is the correct way to add 1 to the $count variable?
$count =+1
$count++;
++count
count++;
How do you create an array in PHP?
$cars = "Volvo", "BMW", "Toyota";
$cars = array["Volvo", "BMW", "Toyota"];
$cars = array("Volvo", "BMW", "Toyota");
How is PHP written into a webpage?
Just like other html tags: <php> </php>
Only in a separate file which is linked to the html page
Using curled brackets {php} {/php}
A PHP script starts with <?php and ends with ?>
PHP script is parsed....
On the client's web browser
On the server where the website is hosted
On the client's CPU
On the Internet
PHP is case sensitive in what way?
It's never case sensitive, don't worry about it.
Only when referring to variables
When referring to classes, functions or variables
All the time!
When concatenating strings, you use what symbol in PHP?
A comma ,
A plus sign +
a hyphen -
a full stop .
Which statement can be used to select the database?
$mysqli=select_db('databasename');
mysqli=select_db('databasename');
mysqli->select_db('databasename');
$mysqli->select_db('databasename');
The updated MySQL extension with PHP5 is typically referred to as
MySQL
mysql
mysqli
mysqly
Which method returns the error code generated from the execution of the last MySQL function?
errno()
errnumber()
errorno()
errornumber()
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;
Which of the following is used to retrieve data from a MySQL database?
mysqli_fetch_all()
mysql_fetch_all()
pdo_fetch_all()
mysqli_query()
Which of the following is used to establish a connection to a MySQL database?
mysqli_connect()
mysql_connect()
pdo_connect()
sql_connect()
Which of the following is used to close a connection to a MySQL database?
mysqli_close()
mysql_close()
pdo_close()
sql_close()
Which of the following is used to retrieve the number of rows in a result set?
) mysqli_num_rows()
mysql_num_rows()
pdo_num_rows()
sql_num_rows()
Which of the following is used to escape special characters in a string before inserting it into a MySQL database?
mysqli_escape_string()
mysql_escape_string()
pdo_escape_string()
sql_escape_string()
The MySQLi extension, the 'i' stands for __________.
impress
improved
initial
What software that you need to make PHP project?
NetBeans & C++
NetBeans & XAMPP
Java & XAMPP
Where is your PHP project file located?
C:\xampp\htdocs\
C:\xampp\project\
D:\xampp\htdocs\
The 2 basic ways to get output in PHP are __________.
echo and cout
echo and scan
echo and print
Can PHP read html and CSS file?
YES
NO
Which one of the following statements is used to create a table?
CREATE TABLE table_name (column_name column_type);
CREATE table_name (column_type column_name);
CREATE table_name (column_name column_type);
CREATE TABLE table_name (column_type column_name);
If there is no error, then what will the error() method return?
TRUE
FALSE
Empty String
0
Which commands perform operation on database?
Insert
Update
Select
Delete
Which is not a relational database management system?
MySql
IBM DB2
Oracle
Windows
The combination of ____ and ______has become very popular server side web scripting language in Internet.
PHP, HTML
HTML, CSS
PHP, MYSQL
HTML, Javascript
MySQL database connectivity and management are performed through _______
mysqli_connect()
mysqli_close()
mysqli_query()
All the above
Which function is used to connect to MySql database?
mysqli_connect()
mysqli_close()
mysqli_query()
$con
mysqli_connect() function requires (a) parameters.
What are the parameters used to database connnection?
Database Server name
Username
Password
Database name
_______ helps to execute the SQL query statements in PHP scripting language
mysqli_connect()
mysqli_close()
mysqli_query()
mysqli_connect_error()
A (a) is a computer or a device that provides functionality for other programs or devices, called “clients”.
Which of the following ways is correct JQuery Event Syntax ?
$("p").click(function(){
// action goes here!! });
$("p").openALl(function(){}
None of the above
With jQuery, you can hide and show HTML elements with the hide() and show() methods?
True
False
Which of the following is the correct syntax of toggle() effects in JQuery?
$("button").click(function(){
$("p").toggle(); });
.("p").toggle();
None of the above
Look at the following selector: $("div"). What does it select?
First div element
all div element
None of the above
Is jQuery a library for client scripting or server scripting?
Client Scripting
Server Scripting
None of the above
With jQuery, look at the following selector: $("div.intro"). What does it select?
First Div elements with class="intro"
All div elements with class="intro"
None of the above
What is the correct jQuery code for making all div elements 100 pixels high?
$("div").height(100)
&("div").height('100')
$("div").high(“100”)
Which jQuery function is used to prevent code from running, before the document is finished loading?
$(document).onload()
$(document).ready()
None of the above
Which of the following is the correct syntax to Set CSS in JQuery?
$("p").css("background-color="yellow");
$("p").css("backgroundcolor", "yellow");
$("p").css("background-color", "yellow");
jQuery provides several methods such as filter(), first(), last(), eq(), slice(), has(), not(), etc.?
True
False
When would the following code be run
$(function() {});
When the user requests the page
When the user pushes a button
After all the elements are loaded
Never
Which of the following is selected by $('.foo')?
<p>Foo</p>
<img id='foo'></img>
<div class='foo'></div>
<foo></foo>
Which of the following is selected by $('#bar')?
<div class='bar'></div>
<p data-bar='bar'></p>
<h1>bar</h1>
<img id='bar'></img>
