Posts

Export Data to Excel with PHP and MySQL

Image
How to Export Data to Excel using PHP and MySQL This tutorial demonstrates you how to export MySQL table data to Excel spreadsheet, when a user clicks a button on a webpage. You can achieve this using PHP, MySQL. For this, create the files specified in the below, in some folder in Apache server.   php2excel-tbl .php export.php    Now run the first file in the web server. When button clicked, export.php will be executed at backend and generates the Excel file. php2excel-tbl.php     <?php /*******EDIT DB Details *******/ $DB_Server = "localhost" ; //MySQL Server $DB_Username = "root" ; //MySQL Username $DB_Password = "" ; //MySQL Password $DB_DBName = "usersdb" ; //MySQL Database Name $DB_TBLName = "users" ; //MySQL Table Name $filename = "excel-users-list" ; //File Name /*******YOU DO NOT NEED TO EDIT ANYTHING BELOW THIS LINE*******/   //create MySQL connection...

Domain availability Checking using PHP

Image
  Domain Name availability Code Example   Are you looking for PHP script for finding the Domain Name availability, in  this post I want to explain how to create a simple PHP domain checking page using PHP Checking domain availability using PHP built-in function : gethostbyname ( ). If available, it returns the URL of the given domain name, ex: abcdomain.com. If not available, it returns the IP address of an existing domain, ex: if example.com entered, it returns the 199.59.242.154. index.php <?php <! DOCTYPE html > < html > < head > < title > domain - available - check - using - php </ title > < meta name = "viewport" content = "width=device-width, initial-scale=1" > < link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" > < l...

PHP MySQL Pagination using Bootstrap4

Image
How to implement PHP MySQL Pagination using Bootstrap4    In this tutorial, you will learn how to implement PHP MySQL Pagination using Bootstrap4. Pagination is actually the process of printing database table records in a page wise. Here is the example of pagination code using PHP and Bootstrap-4 with Next and Previous buttons. Create the following Database and table in MySQL database, in order to run the below given code. Create Database create database usersdb ; Create Table CREATE TABLE ` users ` ( ` id ` int ( 11 ) NOT NULL auto_increment , `user name ` varchar ( 100 ) NOT NULL , ` age ` int ( 3 ) NOT NULL , ` email ` varchar ( 100 ) NOT NULL , PRIMARY KEY ( ` id ` ) ); Create pagination.php in server of your choice like XMPP or WAMP and copy and paste the code and run the file. pagination.php TOP <!DOCTYPE html> <html> <head> <meta http-equiv= "Content-Type" content= "text/html; charset=utf...