How to Create Dynamic Dependent Select Box

How to Create Dynamic Dependent select box using ajax

You need a dynamic dependent select box. We will explain how to create a dynamic dependent select box in PHP, jquery and ajax. index.php <?php include_once 'dbconfig.php'; ?> <html> <head> <title>Dynamic Dependent Select Box using Ajax</title> <script type="text/javascript" src="jquery-1.4.1.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#loding1").hide(); $("#loding2").hide(); $(".country").change(function() { $("#loding1").show(); var id=$(this).val(); var dataString = 'id='+ id; […]
Read Full Article
How to Create Database and tables in MySql

How to Create Database and tables in MySql

In this article will explain How to Create Database and tables in MySql. Create a Database CREATE DATABASE DATABASE_NAME; In MySql, if you want to display a list of all databases to run the below query. SHOW DATABASES; Create Tables: To create a table in MySQL run below query. CREATE TABLE IF NOT EXISTS table_name(col type, […]
Read Full Article
How to use ORDER BY in Mysql

How to use ORDER BY in Mysql

In this article, you will learn How to use ORDER BY in Mysql. Syntax:- SELECT column1, column2, ... FROM table_name ORDER BY column1, column2, ... ASC/DESC; ORDER BY DESC Example:- SELECT * FROM Students ORDER BY StudentID DESC; ORDER BY Few Columns Example:- SELECT * FROM Students ORDER BY Country, StudentName; You may also like:- How […]
Read Full Article
How to Create Cookies in PHP on Browser

How to Create Cookies in PHP on Browser

In this article, you will learn How to Create Cookies in PHP.on Browser A Cookie is used to identify any user. With the help of the PHP, you can retrieve and create the cookie. Syntax:- setcookie(name, value, expire, path, domain, secure, httponly); Create or Retrieve Cookies in PHP Example:- <?php $cookie_name = "user"; $cookie_value = […]
Read Full Article
How to Create Pagination in PHP

How to Create Pagination in PHP

In this article, you will earn How to Create Pagination in PHP. Example:- index.php <?php include('db.php');?> <html> <head> <title>Pagination in PHP</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> </head> <body> <table border="1"> <tr> <th>Sr No.</th> <th>Name</th> <th>Father Name</th> <th>Email</th> <th>Mobile</th> </tr> <?php //Getting default page number if (isset($_GET['pageno'])) { $pageno = $_GET['pageno']; } else { […]
Read Full Article
How to Generate PDF from MySQL Database

How to Generate PDF from MySQL Database

In this article, you will learn How to Generate PDF from MySQL Database. Example:- Table of Employees CREATE TABLE IF NOT EXISTS `employee` ( `EmpId` int(11) NOT NULL, `EmpName` varchar(200) DEFAULT NULL, `EmpDepartment` varchar(200) DEFAULT NULL, `EmpRegDate` timestamp NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1; INSERT INTO `employee` (`EmpId`, `EmpName`, `EmpDepartment`, `EmpRegDate`) VALUES (1, 'Amandeep […]
Read Full Article
How to Get last id From Mysql Using PHP

How to Get last id From Mysql Using PHP

In this article, you will learn How to Get the last id From Mysql Using PHP. Get the last id from tables using the below example. Example:- db.php <?php $servername = "localhost"; $username = "root"; $password = ""; $dbname = "db"; $connection = mysqli_connect($servername, $username, $password, $dbname); if (!$connection) { die("Connection failed: " . mysqli_connect_error()); […]
Read Full Article
Email Verification Script in PHP

How to Create Email Verification Script in PHP

In this article, you will learn How to Create Email Verification Script in PHP. user_registration table CREATE TABLE IF NOT EXISTS `user_registration` ( `id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `email` varchar(255) NOT NULL, `password` varchar(255) NOT NULL, `activationcode` varchar(255) NOT NULL, `status` int(11) NOT NULL, `postingdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB AUTO_INCREMENT=4 […]
Read Full Article
How to Delete Multiple Records from Database using PHP

How to Delete Multiple Records from Database using PHP

In this article, you will learn How to Delete Multiple Records from Database using PHP. Example:- SQL Table CREATE TABLE `users` ( `id` int(10) NOT NULL, `name` varchar(140) DEFAULT NULL, `education` varchar(120) DEFAULT NULL, `doj` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; ALTER TABLE `users` ADD PRIMARY KEY (`id`); ALTER TABLE `users` MODIFY `id` int(10) NOT […]
Read Full Article