jun 12
This commit is contained in:
20
php/connect.inc.php
Normal file
20
php/connect.inc.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
//How to connect to MySQL
|
||||
|
||||
$mysql_host = 'localhost';
|
||||
$mysql_user = 'example_user';
|
||||
$mysql_pass = 'Kolosnjaj4321!';
|
||||
|
||||
$conn_error = 'Could not connect to database!';
|
||||
$mysql_db = 'example_database';
|
||||
|
||||
$con = mysqli_connect($mysql_host, $mysql_user, $mysql_pass);
|
||||
|
||||
if ($con) {
|
||||
if (mysqli_select_db($con, $mysql_db)) {
|
||||
|
||||
} else {
|
||||
die($conn_error);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user