Web Designing and Development Interview Questions Answers

Web Designing and Development Interview Questions Answers for all those people who are planning to be a part of this field and looking for a job must review the following questions and their answers before going for an interview.

You must have the knowledge about the terminologies and there functions. Here are a few questions and there answers to improve your knowledge normally these questions are asked while you go for an interview as a web designer or a web developer in any organization.

  1. How would you use persistent storage on browsers? What options would you use?

For HTML browsers, a good choice would be local storage and persistent storage. For non-HTML ones, cookies are the best bet.

  1. What is W3C?

W3C stands for World Wide Web Consortium which is the international standard for World Wide Web. W3C is constantly busy trying to standardize the web and to make it accessible to all users. The company was created in 1994.

  1. What are the common ways in which you can reduce the load time of a web application?

There are quite a lot of ways you can reduce load time:

Enable browser caching

Optimize images

Minify resources

Minimize HTTP Requests

Reduce redirects

  1. What is DTD?

DTD stands for Document Type Declaration and it tells the browser which version of either HTML or XHTML is being used.

What is the difference between “Web development” and “Web design”.

Web development includes a lot of processes, and Web Design is part of it. Web design is used to represent page layouts and graphical user interface. Web development is a wider term to mean planning, coding, testing, debugging etc.

  1. Describe the key advantages of HTTP/2 as compared with HTTP 1.1.

HTTP/2 among other improvements provides decreased latency to improve page load speed by supporting:

Server push technologies

Prioritization of requests

Data compression of HTTP headers

An important operational benefit of HTTP/2 is that it avoids the head-of-line blocking problem in HTTP 1.

Loading of page elements in parallel over a single TCP connection

How do you optimize a website’s assets?

There are several ways to do this, for example, file concatenation, file compression, CDN Hosting, offloading assets, refining code etc.

  1. What web browser do you use?

Because web developers should be familiar with all browsers in terms of testing their web projects the best answer here is All of them.

  1. What’s the difference between standards mode and quirks mode?

Quirks mode is a default compatibility mode and may be different from browser to browser, which may result in a lack of consistency in appearance from browser to browser.

  1. Explain what is long polling?

Long polling is a web application development pattern used to emulate pushing data from the server to the client. With long polling, the client requests information from the server in a similar way to a normal poll. However, if the server does not have any information available for the client, instead of sending an empty response, the server holds the request and waits for some information to be available.

  1. What is HTML?

HTML stands for Hypertext Markup Language. It is the most popular markup language for creating websites that can be viewed in a web browser.

  1. What is the difference between HTML elements and tags?

HTML elements communicate to the browser how to render text. When surrounded by angular brackets <> they form HTML tags, which come in pairs and surround the text.

  1. What does DOCTYPE mean?

The term DOCTYPE means Document Type Definition and tells the browser which type of HTML is used on a webpage. Browsers use DOCTYPE to determine how to render a page. Failing to use DOCTYPE will load your page in Quirks Mode.

  1. What are the limitations when serving XHTML pages?

The main limitation is the poor browser support of XHTML. Internet Explorer and other user agents cannot parse XHTML as XML. Thus, it is not that extensible language as one might think.

  1. What is the syntax difference between a bulleted list and numbered list?

Bulleted lists use the <ul> tag, which stands for “unordered,” whereas <ol> is used to create an ordered list.

  1. What is the difference between a <div> and a <frame>?

A <div> is a container element for grouping and styling, whereas a <frame> creates divisions within a web page and should be used within the <frameset> tag. The use of <frame> and <frameset> are no longer popular and are now being replaced with the more flexible <iframe>, which has become popular for embedding elements from other websites (ie. Youtube videos) into a page.

  1. What is the difference between the application model of HTML and HTML5?

There is not a big difference between the two. HTML5 is a continuum of HTML. There has been no major paradigm shift.

 

From a broader viewpoint, HTML was a simple language for laying out text and images on a webpage, whereas HTML5 can be viewed as a development platform that does what HTML does that and more, including better support for audio, video, and interactive graphics. It has a number of new elements, supports offline data storage for applications, and has more robust exchange protocols.

  1. What are some new HTML5 markup elements?

Among several

: <article>, <aside>, <bdi>, <command>, <details>, <figure>, <figcaption>, <summary>, <header>, <footer>, <hgroup>, <mark>, <meter>, <nav>, <progress>, <ruby>, <rt>, <section> and < time >.

  1. What are the new image elements in HTML5?

The new image elements in HTML5 are Canvas and WebGL. <canvas> is a new element that acts as a container for graphical elements like images and graphics. WebGL stands for Web Graphics Language, a free cross-platform API that is used for creating 3D graphics in web browsers.

  1. What are the data- attributes good for?

Data-attribute is used to assigns custom data to an element. The stored (custom) data can then be used in the page’s JavaScript to create a more engaging user experience.

  1. Describe the difference between cookies, session Storage.

Cookies are small text files that websites place in a browser for tracking or login purposes, and hold a modest amount of data. Meanwhile, session Storage is new objects, both of which are storage specifications but vary in scope and duration.

  1. What are some of the major new API’s that come standard with HTML5?

Among others: Media API, Text Track API, Application Cache API, User Interaction, Data Transfer API, Command API, and the History API.

  1. What is the difference in caching between HTML5 and the old version of HTML?

A crucial new feature of HTML5 is the Application Cache which creates an offline version of a web application and stores website files such as HTML files, CSS, images, and JavaScript, locally. Obviously, that speeds up site performance.

  1. What is an image map?

An image map is a list of coordinates relating to a specific image, created in order to hyperlink areas of the image to different destinations (as opposed to a normal image link, in which the entire area of the image links to a single destination).

  1. What is the advantage of collapsing white space?

White spaces are blank sequences of space characters, which is actually treated as a single space character in HTML. The browser collapses multiple spaces into a single space, so we can indent lines of text without worrying about multiple spaces. This enables us to organize the code into a much more readable format.

  1. Do all HTML elements need both opening and closing tags?

Not really, elements like <img src=””/> or <input type=””/> don’t need a closing tag.

  1. What is a marquee?

A marquee is used to enable scrolling text in a web page. To do this, just place whatever text you want to appear scrolling within the <marquee> and </marquee> tags.

  1. How do you create links to sections within the same page?

Links can be created using the <a> tag, with referencing through the use of the # symbol. For example, we can have:

<a href=”#top”>BACK TO TOP< /a >

Which would result in the words “BACK TO TOP” appearing on the webpage and links to a bookmark named top? We can then create a separate tag like:

<a name=top></a>

Somewhere on the same webpage so that the user will be linked to that place when clicking on “BACK TO TOP”.

  1. What are the possible ways to apply CSS styles to a web page?

CSS can be applied in the following three ways:

Linked: Create a separate .css file and add all the style for the web page there. Make sure the file is linked to the HTML document(s) using the link tag

Embedded (Internal): Inside the HTML document, open a style tag and inside that, add all styles just like you’d do on a linked file.

Inline: This is done by adding a style attribute inside an HTML element.

  1. Explain the CSS box model.

CSS box model is made up of margins, borders, padding, and content. The box model provides a more structured way to space elements in relation to each other in web pages. In your browser’s developer tools, the CSS box model is found at the end of the CSS section and it looks like this:

box modal css

 

  1. What is the difference between inline and block elements?

Basically, a block element will take up the whole width available, and comes with a line break before and after. Examples of block level elements are: headings (i.e. <h1>), paragraphs (<p>), divisions (<div>) etc. In contrast, inline elements take up only the space they need and do not force line breaks. Examples of inline elements are: anchors (<a>), spans (<span>) etc.

  1. What is grouping used for in CSS?

Grouping allows several elements of HTML to have the very same styles applied. It uses a single declaration and selectors and separated by commas. For example:

h1, h2, .my-class { font-weight: light;

}

  1. What is a Class selector and how does it differ from an ID selector?

Class selectors are used to applying the style to multiple HTML elements identified with the same class. Class selectors are called within the CSS document by a ‘.’, followed by the class name, like this:

.class { color: black;

}

The difference between classes and ID’s is that an HTML element can accept multiple classes, but only one ID. That means ID’s are unique for HTML elements.

  1. What is the difference between visibility: hidden and display: none?

Although these two properties seem similar, there is quite an important difference between the two:

visibility: hidden hides the element, but it will still take up space, this way affecting the layout of the document.

display: none also hides the element, but will not take up space and the page will appear as if the element is not present.

  1. What are CSS preprocessors and why do we use them?

CSS preprocessors convert code written in a preprocessed language like SASS or LESS into the same old CSS we’ve been using for such a long time now. The main advantages of using preprocessors are:

Ability to define variables

Ability to use nested syntax

Ability to create and use mixins (functions)

Use of mathematical and operational functions

However, there are also some disadvantages like updating issues and debugging difficulties.

  1. What are child selectors in CSS?

Child selectors represent a way of grouping (for styling) a set of elements that descend from a parent element. Example:

section > span { background-color: #eee;

}

  1. What are grid systems and why do we use them in web pages?

Grid systems are structured rules that enable content to be stacked horizontally and vertically in a consistent and sustainable way. They find heavy usage in today’s websites because they offer increased productivity while coding, they’re versatile and ideal for responsive layouts.

  1. How do we use shorthand properties and why?

Shorthand properties cannot be applied to any class property but only a few like border, outline, padding, background etc. Shorthand properties reduce file size thus improving page load time. The trick stands for listing all property values on a single line, in a pre-defined order that must be respected. An example would be:

div { background-color: #ccc; background-image: URL(“img.png”) ; background-repeat: no-repeat; background-position: right top;

}

This would be exactly the same as:

div { background: #ccc URL(“img.png”) no-repeat right top;

}

  1. What is the purpose of the z-index and how is it used?

The z-index property specifies the stack order of an element within the document area (or a part of it). An element with greater stack order will always be in front of an element with a lower stack order. However, z-index only works on positioned elements (position: absolute, position: relative, or position: fixed). It can have four kinds of values:

Auto: Sets the stack order equal to its parents.

Number: Orders the stack order.

Initial: Sets this property to its default value (0).

Inherit: Inherits this property from its parent element.

  1. List some of the new CSS properties introduced with CSS3?

The following is a list of new properties added in CSS3:

border-radius

box-shadow

text-shadow

text-stroke

background-size

text-overflow

resize

transition

Also, other features like multiple backgrounds which allow you to have two or more background in the very same selector and flexible box model which ensures that elements behave predictably when the page layout must accommodate different screen sizes and different display devices.

  1. Explain what the pseudo-classes are and their usage.

Pseudo-classes are used to define a special state of an element. Do note that pseudo-classes are not defined in the markup. They can be used for:

Styling an element on mouse over (hover)

Styling an element when it gets focus

Styling visited/unvisited links

  1. What is the CSS selector which allows you to target every element in a web page?

Called the universal selector and signed with a steric (*), it sets all HTML element the same styling rules as defined in the property declarations. For example:

* {

margin: 0 ; padding: 10px;

}

  1. What are the media queries and how are they used?

A media query consists of a media type and at least one expression that limits the style sheets’ scope by using media features, such as width, height, and color. Media queries, added in CSS3, let the presentation of content be tailored to a specific range of output devices without having to change the content itself. The usage of media queries is similar to this:

@media (max-width: 768px) {

.problem-class { property: smaller;

}

}

  1. Define event bubbling.

Because JavaScript allows DOM elements to be nested inside each other, if the handler of the child is clicked, the handler of parent will also work as if it were clicked too. That sums up what event bubbling really is.

  1. How would you declare a three-dimensional array in Javascript?

You can do it like this:

var myArray = [[[]]] ;

  1. What is “this” keyword in Javascript?

This is used to refer to the current object in the code. In the global execution context (outside of any function), this refers to the global object, whether in strict mode or not and focus on the element being under intention.

  1. Does Javascript support automatic type conversion?

Yes. JavaScript does support automatic type conversion and it is the common way of type conversion used by JavaScript developers.

  1. What is event delegation and how does it work?

Event delegation allows us to avoid adding event listeners to specific nodes of the DOM; instead, the event listener is added to one parent. Using event delegation it’s possible to add an event handler to an element, wait for an event to bubble up from a child element and easily determine from which element the event originated.

  1. What is the difference between window.onload and on (Document)? Ready?

The window.onload event will not trigger until every single element on the page has been fully loaded, including CSS, images and/or other assets. The main disadvantage is that it might take a while before any code is actually executed. On the other hand, on (Document). Ready executes code as soon as DOM is loaded.

  1. Which is faster between Javascript and PHP?

Javascript is obviously faster. Why? Because Javascript is a client-side language and execution does not need assistance from the web server. In contrast, PHP or ASP is server-side therefore is slower.

  1. What is an anonymous function is Javascript

An anonymous function is a function declared without any named identifier and in general, is not accessible after its declaration.

  1. Explain the role of break and continue statements.

Break statements are used to come out of the current loop

Continue statements continue the current loop with a new recurrence

  1. How are object properties assigned in JS?

Similar to the way a value is assigned to a variable, we assign object properties like this for example document. Form.

Action=”submit”

  1. What is the difference between undeclared and undefined variables?

Undeclared variables are variables that do not exist in a program and are not declared. If the program tries to read the value of an undeclared variable, then a runtime error is generated.

Undefined variables are variables that are declared in the program but have not been given any value. If the program tries to read the value of an undefined variable, an undefined value is returned.

  1. What would be the result of 5+2+”3 “?

Since 5 and 2 are integers (data type) they will be added together numerically. And since “3” is a string, the result would be a concatenation, meaning 73.

  1. Name some Javascript functions used to convert non-numerical values into numbers.

There are three main ways to do this:

parseInt()

parseFloat()

Number()

  1. What is namespacing in Javascript and how is it used?

Namespacing is used for grouping functions, variables etc. under a unique name. It is a name that has been attached to the desired functions, objects, and properties. This enables code reuse and improves modularity in the coding.

  1. What is a closure in Javascript?

A closure resembles an object. It gets instantiated whenever you call a function. The scope of a closure is lexical, meaning everything contained within the function in which the closure belongs to, has access to any variable that is in it. A decent example would be:

function wcg() { var name = “Web Code Geeks”; function displayMessage() { alert(name) ;

}

displayMessage() ;

} wcg() ;

wcg() creates a local variable name and then a function called displayMessage(). displayMessage() is an inner function that is defined inside wcg() and is only available within the body of that function.displayMessage() has no local variables of its own, however, it has access to the variables of outer functions and so can use the variable name declared in the parent function.

 

  1. How is jQuery different to Javascript?

Well, jQuery is not a programming language, but a well-written JavaScript code (a framework). It is a library built with Javascript. Javascript is the core programming language. It is very popular because it abstracts away cross-browser compatibility issues and emphasizes unobtrusive and callback-driven Javascript programming.

  1. What is $() in jQuery?

The $() function is an alias of jQuery () function. $() function is used to wrap any object into jQuery object, which then allows you to call a various method defined in the jQuery object.

  1. What are the jQuery events?

Events are actions performed on specific conditions. When we perform these actions on an HTML page, we can do whatever we want. We then use event handlers to perform the action. Some important handlers are for example: bind(), unbind(), blur(), off(), hover(), on(), one(), ready(),trigger() etc.

  1. What is called chaining?

Chaining is used to connect multiple events and functions in a selector. It means specifying multiple functions and/or selectors to an element.

  1. What is the difference b/w eventPreventDefault and event.stopPropagation?

In short, preventDefault (): Stops the default action of an element from happening. event.stopPropagation (): Prevents the event from bubbling up to the DOM tree, thus preventing any parent handlers from being notified of the event.

  1. How can we hide an image on a button click using jQuery?

We can have a click handler and then the hide method applied to the image:

$(“#button”).click(function(){

$(“#image”).hide() ;

}) ;

  1. What is AJAX in jQuery?

AJAX stands for “Asynchronous JavaScript and XML”. AJAX is about exchanging data with a server, without reloading the whole page. It is a technique for creating fast and dynamic web pages.

$.ajax() – Performs an async AJAX request.

$.get() – Loads data from a server using an AJAX HTTP GET request.

$.post() – Loads data from a server using an AJAX HTTP POST request.

  1. What Is the Format of an AJAX Request?

An AJAX request can be in any of the following formats:

Text File

HTML

JSON Object

65. How can you find out that an AJAX request has been completed?

We can use the Ready State property to check whether AJAX request has been completed.

If the property is equal to 4, the request has been completed and data is now available.

  1. Do AJAX requests retain PHP session info, when calling multiple times?

Yes, PHP retains the session info over multiple Ajax calls. The duration of the PHP session depends on SESSION configuration.

  1. How can a file be included in a PHP page?

Two functions can be used to include a file: include () and require (). The file path shall be given as the parameter in both cases. For example

include (“header.php”) ; require(“admin_header.php”) ;

  1. What is the difference between echo and print in PHP?

Although almost everyone thinks both of these functions are the same, there are some slight differences to consider:

echo doesn’t return a value whereas print returns a value of 1

print can only take a single argument, while echo can accept multiple parameters

  1. What is a final class? What about a final method?

The final concept of classes and methods do also exist in other programming languages like Java, and in PHP the explanation is similar:

A final class means this class cannot be extended.

A final method means it cannot be overridden.

  1. How can we create a session in PHP? How do we set and unset values in sessions?

PHP provides the following to work with sessions:

To create a session: session_start ();

To set a value into session: $_SESSION[’VAR’]=1;

To remove data from a session: unset($_SESSION[’VAR’]); or can session_destory() to end the session.

  1. How would you connect to MySQL database from a PHP script?

Using the mysql_connect () if using MySQLi then mysqli_connect () function we can connect to a MySQL database like so:

$database = mysql_connect(“HOST”, “USER_NAME”, “PASSWORD”); mysql_select_db(“DATABASE_NAME” ←-

,$database) ;

  1. What are the main differences between GET, POST and REQUEST methods?

GET and POST are used to send information from client browser to web server. In case of getting the information is send via getting method in name/value pair and is URL encoded. The default GET has a limit of 512 characters. The POST method transfers the information via HTTP Headers. The POST method does not have any restriction in data size to be sent. The POST is used for sending data securely and ASCII and binary type’s data. The $_REQUEST contains the content of both $_GET, $_POST and $_COOKIE.

  1. How can we find the length of a string in PHP? What about the length of an array?

PHP provides the strlen () function to find the length of a string and count () function for finding the array length.

  1. What is an associative array?

Associative arrays are arrays that use named keys that you assign to them. An example would be:

$langauges=array(“Front-End”=>”Javascript”,”Back-End”=>”PHP”, “Framework”=>”AngularJS”) ;

  1. Can we send e-mail using PHP? How?

Yes, we can send e-mails in PHP using the mail () function. This function accepts 5 parameters from which 2 are optional. Example:

mail ($to, $subject, $message, $headers) ;

  1. How is a constant defined in PHP?

We can define a constant using the define () directive:

define(“CONSTANT_NAME”, 32); to assign some fixed values to any variable using the define directive.

  1. What encryption techniques are there in PHP?

There are two encryption techniques widely used in PHP:

MD5: The MD5 hash algorithm is implemented using the md5 function like so: $encrypted_string = md5($stri ng);

mcrypt_encrypt: Encrypts plaintext with given parameters. The standard structure is: string mcrypt_encrypt ( string $cipher , string $key , string $data , string $mode [, string $iv ] )

  1. Is it possible to extend the execution time of a PHP script?

Yes, that can be achieved using the set_time_limit(in seconds) which enables us to extend the execution time of a PHP script. Note that the default limit is 30 seconds.

  1. What is the use of header () function in PHP?

The header () function sends a raw HTTP header to a client browser. This function must be called before sending the actual output.

  1. How is the ternary conditional operator used in PHP? The ternary conditional operator is used just like in most languages:

condition_here? execute_if_true: execute_if_false; Three expressions go into this kind of assignment, the condition and two operands describing what should be executed when the condition is true or false.

  1. How can we create a text file using PHP?

Most programming languages like C and Java let you create files. In PHP, the way we create files is:

$filename = “/directory/newfile.txt”;

$file = fopen ($filename, “w”); // open with writing permissions

This is it. The file is created, and we’ve even granted access to write in it. Additionally, we can check if the file can be opened:

if ($file == false) { echo (“File cannot be opened”) ; exit() ;

}

After writing or reading from file, we can close the file.

fwrite($file. “Writing on the file”); // in this case writing

fclose ($file) ;

 

  1. Mention what do you mean by Responsive design?

Responsive design is an approach to building sites to provide an optimal viewing and interaction experience. It focuses on easy navigation of site with a minimum of scrolling, panning and resizing across all devices.

Bootstrap is the most popular CSS, HTML and JS framework used for developing responsive web design

  1. Mention what are some bad examples of web design?

Blinking, spinning or flashing images

Black background with white, light or pale text

Black backgrounds with dark text

Busy tiled background images with any color text

Everything Centered

Too many images or huge images

List of links

Too many headlines or Blinking text

  1. Explain how can a developer learn about web design?

The developer can learn about web design by following tips

Visit website like “Smashing Magazine” to get a better idea about web design

Another website is “Best Web Gallery” can also be helpful to get an insight of quality design and layouts

  1. While writing an error message what all things you need to take into consideration?

You need to take following things in consideration

Don’t use negative words

Clearly mention the error so that the user knows what to correct

Give the user a clue or link to solve the error

Put the blame on yourself and not on the user.

  1. Who Is The Father Of Php And Explain The Changes In Php Versions?

Rasmus Lerdorf is known as the father of PHP. PHP/FI 2.0 is an early and no longer supported version of PHP. PHP 3 is the successor to PHP/FI 2.0 and is a lot nicer. PHP 4 is the current generation of PHP, which uses the Zend engine under the hood. PHP 5 uses Zend engine 2 which, among other things, offers many additional OOP features

  1. How Can We Submit A Form Without A Submit Button?

The main idea behind this is to use Javascript submit () function in order to submit the form without explicitly clicking any submit button. You can attach the document.formname.submit() method to click, change events of different inputs and perform the form submission. You can even build a timer function where you can automatically submit the form after xx seconds once the loading is done. If you have ever tried online testing system there is a time limit for completion of your test once started after that time the form is automatically submitted.

  1. In How Many Ways We Can Retrieve The Data In The ResultSet Of MySQL Using Php?

You can do it by 4 Ways

mysql_fetch_row.

mysql_fetch_array

mysql_fetch_object

mysql_fetch_assoc

  1. What Is The Difference Between Mysql_fetch_object And Mysql_fetch_array?

mysql_fetch_object() is similar to mysql_fetch_array(), with one difference – an object is returned, instead of an array. Indirectly, that means that you can only access the data by the field names, and not by their offsets (numbers are illegal property names).

  1. How Can We Create A Database Using Php And MySQL?

We can create MySQL database with the use of mysql_create_db(“Database Name”) but if you are using GUI interface then you simply input name and create.

  1. What Are The Different Tables Present In MySQL, Which Type Of Table Is Generated When We Are Creating A Table In The Following Syntax:
    Create Table Employee (no Int(2),name Varchar(10)) ?

Total 5 types of tables we can create

MyISAM

Heap

Merge

INNO DB

ISAM

MyISAM is the default storage engine as of MySQL 3.23 and as a result, if we do not specify the table name explicitly it will be assigned to the default engine.

  1. How Can I Execute A Php Script Using Command Line?

As of version 4.3.0, PHP supports a new SAPI type (Server Application Programming Interface) named CLI which means Command Line Interface. Just run the PHP CLI (Command Line Interface) program and provide the PHP script file name as the command line argument. For example, “php myScript.php”, assuming “php” is the command to invoke the CLI program.

Be aware that if your PHP script was written for the Web CGI interface, it may not execute properly in command line environment.

  1. What Is Meant By Nl2br()?

Inserts HTML line breaks (<BR/>) before all newlines in a string nl2br (string); Returns string with” inserted before all newlines. For example, echo nl2br (“god bless\n you”) will output “god bless <br/>you” to your browser.

  1. What Are the Reasons for Selecting Lamp (Linux, Apache, MySQL, Php) Instead Of Combination Of Other Software Programs, Servers And Operating Systems?

All of those are open source resource. Security of Linux is more than windows that’s why 99 percent servers are Linux based. Apache is a better server that IIS both in functionality and security. MySQL is a world most popular open source database. PHP is faster than ASP or any other scripting language.

  1. What Are The Features And Advantages Of Object-oriented Programming?

One of the main advantages of programming is its ease of modification; objects can easily be modified and added to a system thereby reducing maintenance costs.

Programming is also considered to be better at modeling the real world that is procedural programming. It allows for more complicated and flexible interactions.

Systems are also easier for non-technical personnel to understand and easier for them to participate in the maintenance and enhancement of a system because it appeals to natural human cognition patterns. For some systems, an approach can speed development time since many objects are standard across systems and can be reused. Components that manage dates, shipping, shopping carts, etc. can be purchased and easily modified for a specific system

  1. How Can We Get Second Of The Current Time Using Date Function?

$second = date(“s”);

  1. What Is The Difference Between The Functions Unlink And Unset?

unlink() deletes the given file from the file system.

unset() makes a variable undefined as we can use for the session.

  1. How Can We Register The Variables Into A Session?

$_SESSION[’name’] = “Wajid”;

  1. How Can We Get The Browser Properties Using Php?

By using $_SERVER [‘HTTP_USER_AGENT’] variable will give us the information about the web browser and its version and so on.

  1. What Is The Maximum Size Of A File That Can Be Uploaded Using Php and How Can We Change this?

By default the maximum size is 2MB. And we can change the following set up a php.ini upload_max_filesize = 2M here you can use your own.

  1. How Many Ways Can We Get The Value Of Current Session Id?

session_id() returns the session id for the current session.

  1. How Can We Destroy the Session, How Can We Unset the Variable of A Session?

session_unregister — Unregister a global variable from the current session session_unset — Free all session variables session_destroy() destroy the session

LEAVE A REPLY

Please enter your comment!
Please enter your name here