6/7/22, 9:19 AM ENJOY.
PDF - FULL STACK WEB DEVELOPMENT (END SEM EXAMS) - 3 - Evernote
ENJOY.PDF - FULL STACK WEB DEVELOPMENT (END
SEM EXAMS) - 3
You can fund me on:
Phone number - +91 9627850233
UPI ID - sooperprabhat@okicici
Note
I've already sorted the questions in order of importance. So, Start from the top gradually moving
down.
Some question are not complete, You may skip them. I'll be completing them ASAP.
I'm updating this frequently, so the content might be different than the last time you viewed it.
What is CMS(Content Management System) and what are the
popular CMS in PHP?
Explanation Video Link - HERE
A content management system, often abbreviated as CMS, is software that helps users create, manage,
and modify content on a website without the need for specialized technical knowledge.
In simpler language, a content management system is a tool that helps you build a website without
needing to write all the code from scratch (or even know how to code at all).
Instead of building your own system for creating web pages, storing images, and other functions, the
content management system handles all that basic infrastructure stuff for you so that you can focus on
more forward-facing parts of your website.
A content management system is made up of two core parts:
A content management application (CMA) – this is the part that allows you to actually add and
manage content on your site (like you saw above).
A content delivery application (CDA) – this is the backend, behind-the-scenes process that takes
the content you input in the CMA, stores it properly, and makes it visible to your visitors.
Together, the two systems make it easy to maintain your website.
Beyond the self-hosted WordPress software, other popular content management systems include:
Joomla
https://www.evernote.com/client/web#?n=0f217897-afd8-cc7e-f23f-a4baf95b62c9&swm=true& 1/15
6/7/22, 9:19 AM ENJOY.PDF - FULL STACK WEB DEVELOPMENT (END SEM EXAMS) - 3 - Evernote
Drupal
Magento (for eCommerce stores)
Squarespace
Wix
TYPO3
How to create a MYSQL connection and Database in PHP?
3
Explanation Video Link - HERE
Explanation Video Link - HERE
<?php
$servername = "localhost";
$database = "database";
$username = "username";
$password = "password";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $database);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
echo “Connected successfully”;
mysqli_close($conn);
?>
<?php
$servername = "localhost";
$username = "username";
$password = "password";
// Create connection
$conn = new mysqli($servername, $username, $password);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
https://www.evernote.com/client/web#?n=0f217897-afd8-cc7e-f23f-a4baf95b62c9&swm=true& 2/15
6/7/22, 9:19 AM ENJOY.PDF - FULL STACK WEB DEVELOPMENT (END SEM EXAMS) - 3 - Evernote
// Create database
$sql = "CREATE DATABASE myDB";
if ($conn->query($sql) === TRUE) {
echo "Database created successfully";
} else {
echo "Error creating database: " . $conn->error;
}
$conn->close();
?>
Describe the concepts of HTTP is stateless protocol, and how to
use SESSION and COOKIES in PHP to make it Stateful.
Explanation Video Link - HERE
Explanation Video Link - HERE
Explanation Video Link - HERE
Explanation Video Link(OPTIONAL) - HERE
HTTP is a "stateless" protocol which means each time a client retrieves a Web Page, the client opens a
separate connection to the Web server and the server automatically does not keep any record of
previous client request.
Cookie
A cookie is a small file with the maximum size of 4KB that the web server stores on the client computer.
Once a cookie has been set, all page requests that follow return the cookie name and value. A cookie can
only be read from the domain that it has been issued from. For example, a cookie set using the domain
www.abc.com can not be read from the domain career.abc.com. Most of the websites on the internet
display elements from other domains such as advertising. The domains serving these elements can also
set their own cookies. These are known as third party cookies.
A cookie created by a user can only be visible to them. Other users cannot see its value. Most web
browsers have options for disabling cookies, third party cookies or both. If this is the case then PHP
responds by passing the cookie token in the URL.
CREATING COOKIE
<?php
https://www.evernote.com/client/web#?n=0f217897-afd8-cc7e-f23f-a4baf95b62c9&swm=true& 3/15
6/7/22, 9:19 AM ENJOY.PDF - FULL STACK WEB DEVELOPMENT (END SEM EXAMS) - 3 - Evernote
setcookie(cookie_name, cookie_value, [expiry_time], [cookie_path], [domain], [secure], [httponly]);
?>
DELETING COOKIE
<?php
setcookie("user_name", "Guru99", time() - 360,'/');
?>
Session
A session is a global variable stored on the server. Each session is assigned a unique id which is used to
retrieve stored values.
Whenever a session is created, a cookie containing the unique session id is stored on the user’s computer
and returned with every request to the server. If the client browser does not support cookies, the unique
php session id is displayed in the URL. Sessions have the capacity to store relatively large data compared
to cookies.
The session values are automatically deleted when the browser is closed. If you want to store the values
permanently, then you should store them in the database. Just like the $_COOKIE array variable, session
variables are stored in the $_SESSION array variable. Just like cookies, the session must be started
before any HTML tags.
CREATING SESSION
<?php
session_start(); //start the PHP_session function
if(isset($_SESSION['page_count']))
{
$_SESSION['page_count'] += 1;
}
else
{
$_SESSION['page_count'] = 1;
}
echo 'You are visitor number ' . $_SESSION['page_count'];
?>
DESTROYING SESSION
<?php
https://www.evernote.com/client/web#?n=0f217897-afd8-cc7e-f23f-a4baf95b62c9&swm=true& 4/15
6/7/22, 9:19 AM ENJOY.PDF - FULL STACK WEB DEVELOPMENT (END SEM EXAMS) - 3 - Evernote
session_destroy(); //destroy entire session
?>
Design and write a in HTML5 Form.
Explain CSS Pseudo classes, Pseudo entity and type selector.
A Pseudo class in CSS is used to define the special state of an element. It can be combined with a CSS
selector to add an effect to existing elements based on their states. For Example, changing the style of an
element when the user hovers over it, or when a link is visited. All of these can be done using Pseudo
Classes in CSS.
/* The first line of every <p> element. */
p::first-line {
color: blue;
text-transform: uppercase;
}
A CSS selector selects the HTML element(s) for styling purpose. CSS selectors select HTML elements
according to its id, class, type, attribute etc.
There are many basic different types of selectors.
/* All <a> elements. */
a {
color: red;
}
/* elements with id="div-contaier" */
#div-container{
color: blue;
background-color: gray;
}
/* elements with class="paragraph-class" */
https://www.evernote.com/client/web#?n=0f217897-afd8-cc7e-f23f-a4baf95b62c9&swm=true& 5/15
6/7/22, 9:19 AM ENJOY.PDF - FULL STACK WEB DEVELOPMENT (END SEM EXAMS) - 3 - Evernote
.paragraph-class {
color:white;
font-family: monospace;
background-color: purple;
}
/* Universal Selector */
* {
color: white;
background-color: black;
}
/* Group Selector */
#div-container, .paragraph-class, h1{
color: white;
background-color: purple;
font-family: monospace;
}
What does DOM stand for? Explain the topmost objects of DOM in
javascript.
Explanation Video Link - HERE
DOM is a way to represent the webpage in a structured hierarchical way so that it will become easier for
programmers and users to glide through the document. With DOM, we can easily access and manipulate
tags, IDs, classes, Attributes, or Elements of HTML using commands or methods provided by the
Document object. Using DOM, the JavaScript gets access to HTML as well as CSS of the web page and can
also add behavior to the HTML elements. so basically Document Object Model is an API that
represents and interacts with HTML or XML documents.
Define the CSS Box Model and use selectors to provide the styles
to the web pages at various levels.
Explanation Video Link - HERE
The CSS box model is essentially a box that wraps around every HTML element. It consists of: margins,
borders, padding, and the actual content. The image below illustrates the box model:
https://www.evernote.com/client/web#?n=0f217897-afd8-cc7e-f23f-a4baf95b62c9&swm=true& 6/15
6/7/22, 9:19 AM ENJOY.PDF - FULL STACK WEB DEVELOPMENT (END SEM EXAMS) - 3 - Evernote
p g g
Explanation of the different parts:
Content - The content of the box, where text and images appear
Padding - Clears an area around the content. The padding is transparent
Border - A border that goes around the padding and content
Margin - Clears an area outside the border. The margin is transparent
* {
color: white;
background-color: black;
}
a {
color: red;
}
#div-container{
color: blue;
background-color: gray;
}
.paragraph-class {
color:white;
font-family: monospace;
background-color: purple;
}
#div-container-2, .paragraph-class-2, h1{
color: white;
background-color: purple;
font-family: monospace;
}
Write a function in java script to insert a string within a string at a
https://www.evernote.com/client/web#?n=0f217897-afd8-cc7e-f23f-a4baf95b62c9&swm=true& 7/15
6/7/22, 9:19 AM
j ENJOY.PDF - FULL
p STACK WEB DEVELOPMENT (ENDgSEM EXAMS) - 3 - Evernote g
particular position.
// INSERT STRING2 AT POS IN STRING1
function insertString(string1, string2, pos){
string1 = string1.substr(0, pos) + string2 + string1.substr(pos);
return string1;
}
console.log(insertString("Hi, My is This", "name", 7));
// INPUT
// STRING1 = "Hi, My is This"
// STRING2 = "name"
// POS = 7
// OUTPUT
// Hi, My name is This
What is a difference between DIV and SPAN tag. List the various
HTML tags and use them to develop the user-friendly web pages.
Explanation Video Link - HERE
<div>
The <div> tag is a block level element. The <s
It is best to attach it to a section of a web page. It is best to attach a C
It accepts align attribute. It doe
This tag should be used to wrap a section, for highlighting that section. This tag should be use
hi
This is our list of basic HTML tags:
<a> for link
<b> to make bold text
<strong> for bold text with emphasys
<body> main HTML part
<br> for break
<div> it is a division or part of an HTML document
https://www.evernote.com/client/web#?n=0f217897-afd8-cc7e-f23f-a4baf95b62c9&swm=true& 8/15
6/7/22, 9:19 AM ENJOY.PDF - FULL STACK WEB DEVELOPMENT (END SEM EXAMS) - 3 - Evernote
<h1>... for titles
<i> to make an italic text
<img> for images in document
<ol> is an ordered list, <ul> for an unordered list
<li> is a list item in bulleted (ordered list)
<p> for paragraph
<span> to style part of text
Write a program in javascript to input a string from user through a text field convert a string to Uppercase
on onfocus() event and Lowercase on onblur( ) event.
Explain, what is php? Name and uses all Super Global Variable
define in PHP with suitable examples.
Explanation Video Link - HERE
Explanation Video Link - HERE
Explanation Video Link - HERE
PHP is a server side scripting language that is embedded in HTML. It is used to manage dynamic content,
databases, session tracking, even build entire e-commerce sites. It is integrated with a number of
popular databases, including MySQL, PostgreSQL, Oracle, Sybase, Informix, and Microsoft SQL Server.
PHP is pleasingly zippy in its execution, especially when compiled as an Apache module on the Unix side.
The MySQL server, once started, executes even very complex queries with huge result sets in record-
setting time. PHP supports a large number of major protocols such as POP3, IMAP, and LDAP. PHP4
added support for Java and distributed object architectures (COM and CORBA), making n-tier
development a possibility for the first time.
Some predefined variables in PHP are "superglobals", which means that they are always accessible,
regardless of scope - and you can access them from any function, class or file without having to do
anything special.
The PHP superglobal variables are:
$GLOBALS
https://www.evernote.com/client/web#?n=0f217897-afd8-cc7e-f23f-a4baf95b62c9&swm=true& 9/15
6/7/22, 9:19 AM ENJOY.PDF - FULL STACK WEB DEVELOPMENT (END SEM EXAMS) - 3 - Evernote
$GLOBALS
$_SERVER
$_REQUEST
$_POST
$_GET
$_FILES
$_ENV
$_COOKIE
$_SESSION
Write a program in php how to upload a file, check type of file is of image, length of a file < 50000 and
image type equal jpeg only.
Write a PHP program, how to connect through a database ? Write a PHP program to select data from the
database.
Explain include vs. require function in PHP also explain GET vs. POST method with suitable example.
Write a java script to display the timer clock on webpage using method setinterval(), and setTimeOut.
What is XML and DTD ? Explain relationship between XML and DTD with some suitable example.
Write a program in PHP to open file and read contents char by char till the end of the file, find all the
consonant in separate file and vowel in separate file. And also explain fopen( ) all permission.
Explain the PHP array sort functions with examples.
How to create a session ? How to set a value in session ? How to remove data from a session?
Explain setcookie() function in PHP and how can you retrieve a cookie value?
Write syntax to file handling like open file, read file, write file in PHP.
https://www.evernote.com/client/web#?n=0f217897-afd8-cc7e-f23f-a4baf95b62c9&swm=true& 10/15
6/7/22, 9:19 AM ENJOY.PDF - FULL STACK WEB DEVELOPMENT (END SEM EXAMS) - 3 - Evernote
Briefly discuss the event handling from body elements and button elements in JavaScript.
What does DOM stand for ? Explain the top most objects in the DOM. Explain the Navigator Object in
detail.
How we can retrieve the data in the result set of MySQL using PHP?
What is the importance of "method", "Action" and "enctype" attributes in a html form?
What is selector in CSS ? Can I attach more than one declaration to a selector ? What is cascading order?
Write down the client side and server side code for save an uploaded file in PHP.
Write the PHP code to upload the file. And find the relevant information about the file like name, type,
size etc.
Explain how RegExp object methods are useful in pattern matching with at least two examples.
Create an HTML form with name, mobile and email field and validate it through JavaScript. Name,
mobile and email cannot be left blank and mobile should be ten digit number.
Briefly discuss the event handling from image elements and button elements in JavaScript.
Write the PHP code to connect the MySQL Database. And insert the relevant information, about the
students.
Explain the built-in functions of associative array in PHP with suitable example.
Write a JavaScript code for scientific calculator include (sqrt, log, power, exp, sin, cos, tan, mod).
https://www.evernote.com/client/web#?n=0f217897-afd8-cc7e-f23f-a4baf95b62c9&swm=true& 11/15
6/7/22, 9:19 AM ENJOY.PDF - FULL STACK WEB DEVELOPMENT (END SEM EXAMS) - 3 - Evernote
Write a PHP code to create access the cookies to maintain the session.
Explain #GLOBALS[], $_SERVER[], %_SESSION[] super global array with proper examples.
Explain alert(), prompt() and confirm() dialog box with suitable example.
What is the purpose of XML DTD ? Write DTD file with suitable XML file. Both Internal and External.
Write a JavaScript to find the factorial of given number. The number must be entered using a prompt.
Explain , "GET' and "POST' Method.
Explain class, id and generic selector with suitable example.
What are the data types used in XML scheme, give appropriate example ? Explain how we can set the
restrictions using schema?
Explain Navigator object with suitable example. Explain with code, how to parse XML document using
DOM?
Explain inline, embedded document and external level style sheet with suitable example also explain
priority of CSS impact on web page.
What are <frameset> and <iframe> tags? illustrate them. Explain the CSS for setting background image to
the web browser.
Create an HTML page for Student information form with name, roll no, branch, gender, address, save and
reset option and validate it through JavaScript. Name and roll number cannot be left blank and roll no
should be six characters alphanumeric.
What are the dialog boxes? What are the return types of different type of dialog boxes? Explain each of it
with suitable example.
https://www.evernote.com/client/web#?n=0f217897-afd8-cc7e-f23f-a4baf95b62c9&swm=true& 12/15
6/7/22, 9:19 AM ENJOY.PDF - FULL STACK WEB DEVELOPMENT (END SEM EXAMS) - 3 - Evernote
Write a JavaScript code for validating e-mail id.
Write a complete JavaScript code for scientific calculator.
Explain event handling in JavaScript Write a JavaScript code for any five different events.
Explain Document object model (DOM) and explain, what are the ways by which we can access the
elements in JavaScript?
How we can implement a function in PHP ? If you generate data within a function, what are the couples
of ways to convey the data to the rest of the program ?
Write the PHP code to upload the file. And find the relevant information about the file like name, type,
size etc.
Explain DHIML and write a DHTML script displaying some text on the browser window. There will be two
buttons. If We click one button then the text size will grow and if we click another button then the text
size will reduce.
Explain the role of regular expression in web programming. Write a JavaScript function to test whether
the word "fox" exist in string"The quick brown fox".
Explain the importance of cookies and sessions in web programming, and write a code in PHP by which
we can read the contents of one file and write it to another file.
What syntax is used to create an associative array? Explain the built-in sorting functions of array in PHP
with suitable example.
Explain $_GET[] and $_POST[ ] super global array with proper examples.
What is Variable? How variables are declared in PHP ? Explain List and explain possible data types
https://www.evernote.com/client/web#?n=0f217897-afd8-cc7e-f23f-a4baf95b62c9&swm=true& 13/15
6/7/22, 9:19 AM ENJOY.PDF - FULL STACK WEB DEVELOPMENT (END SEM EXAMS) - 3 - Evernote
What is Variable? How variables are declared in PHP ? Explain. List and explain possible data types
available in PHP.
Explain alert(), Prompt() and confirm() dialog box with example.
Explain· JavaScript Document Object Model structure in detail.
List major JavaScript events and explain with example. How variable are declared in JavaScript? Explain.
Explain echo( ) and print( ) function. Explain die( ) and exit().
How are user defined functions declared and used? Explain with syntax and example.
How is array declared in PHP ? Also explain various types of array with proper examples.
Explain regular expression. Also explain regex with example. Write regular expression for mobile no.
Explain possible methods of escaping from HTML to PHP code. Explain hidden field with example.
Difference Between:
require_once(), require(), include().
$message and $$message
XML and HTML
include and require in php
Short Note on:
header() function in PHP
associative array in PHP
magic constants in PHP
Document type definition (DTD)
File Handling in PHP
Document Object Model (DaM)
Span and div tags
The Navigator Objects
https://www.evernote.com/client/web#?n=0f217897-afd8-cc7e-f23f-a4baf95b62c9&swm=true& 14/15
6/7/22, 9:19 AM ENJOY.PDF - FULL STACK WEB DEVELOPMENT (END SEM EXAMS) - 3 - Evernote
XML Name Space
Explain Functions:
Strlen()
Strpos()
Strchr()
Strrev()
Trim()
Current ()
Next ()
Prey ( )
End ()
Reset ()
Key ()
Print-r()
https://www.evernote.com/client/web#?n=0f217897-afd8-cc7e-f23f-a4baf95b62c9&swm=true& 15/15