Skip to content

Commit

Permalink
Create connection.php
Browse files Browse the repository at this point in the history
Connection to Database with PHP file
  • Loading branch information
Ankam Ravi Kumar authored Nov 5, 2019
1 parent 54ae3cb commit 8d219fa
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions source/connection.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

// server info
$server = 'localhost';
$user = 'UserName';
$pass = 'Password';
$db = 'databasename';

// connect to the database
$mysqli = new mysqli($server, $user, $pass, $db);

// show errors (remove this line if on a live site)
mysqli_report(MYSQLI_REPORT_ERROR);

?>

0 comments on commit 8d219fa

Please sign in to comment.