Category Archives: PHP

PHP – Form Validation

In forms, some of the fields are important and it is necessary that we validate it those fields are filled or not. PHP supports two types of validation: Client-side validation– validation is done on the client-side web browser. Server-side validation– after the submission of the data, the data is sent to the server where it is being validated… Read More »

PHP – For C Developers

There are many similarities and differences that both languages possess. Below are some points that you can consider working with these languages. Similarities Syntax: It is most of the PHP syntax is similar to C, which includes- Code is blank space insensitive, semicolons are used to terminate the statements, PHP has the same function calls structure as in C,… Read More »

PHP Object Oriented

PHP supports the same OOPS concept as any other language like Java, C++, etc which allows it to build complex and reusable web applications. Some of the below OOPS concepts are explained in PHP. Class Object Inheritance Polymorphism Overloading Data abstraction constructor Destructor 1. Defining classes in PHP A class can be considered as the user-defined data type… Read More »


XML (extensible markup language) works similarly to HTML with opening and closing tags. You can store and transfer data from one system to another using XML. You can create customized tags that are not possible in HTML. XML uses the DOM model to access and manipulate the XML data. The XML code can be converted to the XML… Read More »


What is AJAX? You can unleash the great features bu using AJAX with PHP. AJAX (asynchronous javascript and XML) is a method that reduces client and server interactions by updating a part of the webpage instead of the whole page. AJAX allows the exchange of data without the page being refreshed. Javascript is a client-side language that is… Read More »

Backing up the database using PHP

Backing up data will help you to keep your data safe in case of any failure and you can retrieve data from the backup file any time you lost your data. PHP allows you to create a backup of the database in three different ways. Using SQL command Using binary mysqldump Using the phpMyAdmin user interface Using SQL… Read More »

Deleting Data from within the Database using PHP

You can delete data from the database using delete command within the mysql_query function. Example: <html> <head> <title>Deleting a Record from Database</title> </head> <body> <?php if(isset($_POST[‘delete’])) { $db_host = ‘localhost:3036’; $db_user = ‘root’; $db_pass = ‘rootpassword’; $db_conn = mysql_connect($db_host, $db_user, $db_pass); if(! $db_conn ) { die(‘Connection failed: ‘ . mysql_error()); } $stu_id = $_POST[‘stu_id’]; $db_sql = “DELETE from… Read More »