Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

Dynamic Websites Quizzes

Contents
Topic-1.............................................................................................................................................2

Topic-2.............................................................................................................................................3

PHP Operators and Lopping Quiz...................................................................................................4

Building PHP with Database...........................................................................................................6

DW Script........................................................................................................................................7

Cookies............................................................................................................................................8
Topic-1
No. Questions Answers
Web application and commonly e-commerce websites
1. 3 Layers
have_____________.
Static web pages needed to be refreshed by the server
2. True
every time the data changed.
3. Static websites are very slow. True
Most Static websites need the programming language
4. True
and relational database system.
5. Dynamics websites not include the html code. False
Most web applications now imitate the look and feel of
6. False
desktop applications.
Website generally consists middle dynamic content
7. True
processing and generation level application server.
Topic-2
No. Questions Answers
If we want define style for an unique element, then
1. Id
which css selector will we use ?

If we don't want to allow a floating div to the left side


2. Clear
of an element, which css property will we use ?
Which element is used in the <HEAD> section on an
3. HTML / XHTMLpage, if we want to use an external <link>
style sheet file to decorate the page ?
4. Heaing tag have ____________ tags. 6
5. Boostrap CSS framwork not compatible for moible. No
Most webpage use the html language for website
6. True
layout.
7. #ff0000 represents for blue. False
Websites are used the below code for mobile
responsive.
8. True
<meta name=“viewport” content=“width-device-width,
initial-scale=1, shrink-to-fit=no”>
9. Bootstrap not use responsive grid system. False
PHP Operators and Lopping Quiz
No. Questions Answers
What does PHP stand for?
i) Personal Home Page
1. ii) Hypertext Preprocessor Both i) and ii)
iii) Pretext Hypertext Processor
iv) Preprocessor Home Page
2. PHP files have a default file extension of_______ .php
3. What should be the correct syntax to write a PHP code? <?php ?>
4. Which is the right way of declaring a variable in PHP? $This

What will be the output of the following PHP code?


1. <?php
2. $foo = 'Bob';
3. $bar = &$foo; My name is BobMy name is
5.
4. $bar = "My name is $bar"; Bob
5. echo $bar;
6. echo $foo;
7. ?> a
What will be the output of the following PHP code?
1. <?php
2. $total = "25 students";
6. 3. $more = 10; clueget
4. $total = $total + $more;
5. echo "$total";
6. ?>
What will be the output of the following PHP code?
1. <?php 2. $a = 5; 1
7. 3. $b = 5;
4. echo ($a === $b);
5. ?>
8. Which of the below symbols is a newline character? \n

9. Which of the below symbols is a newline character? \n


10. What will be the output of the following PHP code? AshleyBaleBlank
1. <?php
2. $user = array("Ashley", "Bale", "Shrek",
"Blank");
3. for ($x=0; $x < count($user); $x++) {
4. if ($user[$x] == "Shrek") continue;
5. printf ($user[$x]);
6. }
7. ?>
Building PHP with Database
No. Questions Answers
Which one of the following databases has PHP
1. MySQL
supported almost since the beginning?

The updated MySQL extension released with PHP 5 is


2. mysqli
typically referred to as _______________
Which one of the following lines need to be
3. uncommented or added in the php.ini file so as to extension=php_mysqli.dll
enable mysqli extension?
Which one of the following statements is used to create CREATE TABLE table_name
4.
a table? (column_name column_type);

Which one of the following statements can be used to $mysqli-


5.
select the database? >select_db('databasename');

Which one of the following methods can be used to


6. diagnose and display information about a MySQL mysqli_connect_errno()
connection error?
If there is no error, then what will the error() method
7. Empty String
return?
Which method retrieves each row from the prepared
8. statement result and assigns the fields to the bound mysqli_fetch_row()
results?
Which one of the following methods is used to
9. mysqli_close()
recuperating prepared statements resources?
DW Script
No. Questions Answers
Powerful functional
programming techniques is
1. Which of the following is not the feature of jQuery?
not used for operating on sets
of elements as a group
Which of the following is a single global function
2. jQuery()
defined in the jQuery library?
3. Which of the following is a factory function? jQuery()
Which is the method that operates on the return value
4. css()
of $()?
5. how to hides the current element? $(this).hide();
$( "li.item-
How to write if you change the background color of
6. a" ).offsetParent().css( "backg
ul>li.item-a ?
round-color", "red" );
7. Which one is correct for ajax sentence? jQuery.ajax(url,[,settings])
Cookies
No. Questions Answers
Which one of the following is the very first task Check whether a valid
1.
executed by a session enabled page? session exists
2. How many ways can a session data be stored? 4
Which one of the following is the default PHP session
3. PHPIDSESS
name?
A cookie is created with the __________________ setcookie
4.
function.
5. Cookie function includes ____________ parameters. 7
Which one of the following function is used to start a
6. session_start()
session?
Which function is used to erase all session variables
7. session_unset()
stored in the current session?
Which one of the following statements should you use $_SESSION[‘username’] =
8.
to set the session username to Nachi? “Nachi”;
What is the return type of session_set_save_handler()
9. boolean
function?

You might also like