Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ Follow the steps below to set up the project on your local machine.

---

View the live project here : [https://silver-ai.netlify.app/](https://silver-ai.netlify.app/)
15 changes: 8 additions & 7 deletions services/connect.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?php

$host="localhost";
$user="root";
$pass="";
$db="login";
$conn=new mysqli($host,$user,$pass,$db);
if($conn->connect_error){
echo "Failed to connect to DB".$conn->connect_error;
$host = getenv('DB_HOST');
$user = getenv('DB_USER');
$pass = getenv('DB_PASS');
$db = getenv('DB_NAME');

$conn = new mysqli($host, $user, $pass, $db);
if ($conn->connect_error) {
echo "Failed to connect to DB" . $conn->connect_error;
}
?>