Create simple Mysql connection with the help of PHP code
<?php
$hostname = 'localhost'; //define the hostname here
$username = 'root'; //define the username here
$password = ' '; //define the password here
$dbname = 'database_name'; //define the database name here
mysql_connect($hostname,$user,$password) or die('unsuccessful connection ');
//mysql_connect() is function of php to establish the connection from Mysql
?>
In this tutorial we'll learn how to establish a connection to a MySQL database from within a PHP script.
we are establish the connection simple and secure with the help of this PHP code script
0 Comment(s)