-
Notifications
You must be signed in to change notification settings - Fork 1
/
db.php
32 lines (28 loc) · 776 Bytes
/
db.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
/*******************************************************************
*
DESCRIPTION: This form is used to connect from with the database
*
* CREATED: 31 May, 2013
* AUTHOR/S: Rajni, Suraj
*
* (cc) WeaveBytes InfoTech Pvt Ltd, www.weavebytes.com
*
*
*
**********************************************************************************/
define('HOST','localhost');
define('USER','weavebyt_navi');
define('PASSWORD', 'st01c');
define('DBNAME','weavebyt_trucks');
//conencting to database
$con=mysql_connect(HOST, USER, PASSWORD);
if(!$con){
echo"connection not created";
}
//selecting database
$db=mysql_select_db(DBNAME);
if(!$db){
die("<b>ERROR: Failed to connect to database. <br>Can't continure further...</b>");
}
?>