Bladephp: Now with 7+ codeigniter, php, and laravel project 7+ php project From $18/Year From Rs. 1000/Year

Mysql Database Connection in PHP

by
Category:php
php mysql
Mysql Database Connection in PHP

Before you can get content out of your MySQL database, you must know how to establish a connection to MySQL from inside a PHP script. To perform basic queries from within MySQL is very easy. This article will show you how to get up and running.

Example

<?php
	define('DB_SERVER', "localhost");
	define('DB_USER', "root");
	define('DB_PASS', "");
	define('DB_DATABASE', "whatsappdwld_db");
	$con = mysqli_connect(DB_SERVER, DB_USER, DB_PASS, DB_DATABASE);
?>

0 Comments


Html code work in comment box


Related Post