In the article I have declare queries and function for connect database using php
$connect = mysql_connect(“localhost”,”root”,”password”) or die (mysql_error());
mysql_select_db(“tracetrick”) or die (mysql_error());
echo “Connected Sucessfully!”;
In the query error_reporting function is the display which error occurs in code or program. mysql_connect is connection function with mysqldatabase.die(mysql_error()) provides error occur in your code. mysql_select_db function is select your database in MYSQLdatabse and tracetrick is my databasename . Finally, this code is completely run output will display is “Connected Sucessfully ”.
Now, You can check more database operation such as Insert data into database,Update data into database,Delete data from database,Search data from database.