database connection info (DRY)
bu2chlc Nov 16th, 2019 169 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- // the database credentials and connection are stored in this file and included in each php page
- // db connection credentials
- $conn= mysqli_connect($db_host, $db_user, $db_pass, $db_name);
- // if there is a connection error, print the error
- printf("Connect failed: %s\n", $conn->connect_error);
- // handle the error or even die, why continue if there is no db connection.
RAW Paste Data