Wednesday, 4 June 2014

How to connect to database config.php

By on 04:20
How is that we create a php fileto connect to the database
First we need to checkthe application is installed or not xampp and service for apache and mysqlnya already way or not?
if it had stayed we make koneksi.php file / config.php



<?php

$host = 'localhost'; 
$user = 'root'; 
$pass = '';


$dbname = 'dbname';
$connect = mysql_connect($host, $user, $pass) or die(mysql_error());
$dbselect = mysql_select_db($dbname);

?>

0 comments:

Post a Comment