PHP Basics

This category contains tutorials related to PHP Basics tutorials.

PHP Global Variables

In this tutorial, we will learn about PHP Global Variables. The global variables are also known as superglobals and These these superglobal variables first time introduced in PHP 4.1.0 on 10 December 2001. A very interesting thing about these superglobal variables is these variables are always accessible. You can access them in different PHP files

PHP Global Variables Read More »

PHP Cookies

In this tutorial, we will learn about PHP Cookies. PHP Cookies are used to store some data on client’s machines in the form of a text file. The main motive of storing cookies on the client machine is to identify the user when user will revisit a site. Because whenever a user requests a web

PHP Cookies Read More »

PHP Sessions

In this tutorial, we will learn about PHP Sessions. PHP sessions are a way to access data among different web pages of the website. All the session variables and their values stored in a file in the temporary directory on the server. With the help of PHP sessions, we can share various kind of data among

PHP Sessions Read More »

PHP File Handling

In this tutorial, we will learn about PHP File Handling. File Handling is really useful if you want to perform some any file-related operations in your web application such as creating a new file, opening an existing file, delete a file etc. Here is a list of file-related operations: Creating a new file Opening an existing

PHP File Handling Read More »

PHP Form Handling

In PHP GET and POST superglobals are used to collect form-data. In our first example program, we will create a search web page using the get method. let’s start with the search page example. Example Program: <?php if(isset($_GET[“submit”])){ echo “<h2>Your are searching for ” . $_GET[“search”] . “</h2>”; } ?> <html> <body> <form method=”GET”> <input type=”text” name=”search” placeholder=”Search

PHP Form Handling Read More »

Comments in PHP

Comments are not used to perform any function in the program but are useful for developers. Developers can write comments with variables and functions to remember their working (purpose) in the program. One important thing to mention is that comments don’t have any impact on the execution of the program. Types of Comments: Single Line comments Multi-Line comments Single-Line

Comments in PHP Read More »

Scroll to Top