Advertisement
Guest User

databasemsqli

a guest
Jul 21st, 2022
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. <?php
  2.  
  3. require_once('db_credentials.php');
  4.  
  5. function db_connect() {
  6. $connection = mysqli_connect(DB_SERVER, DB_USER, DB_PASS, DB_NAME);
  7. return $connection;
  8. }
  9.  
  10. function db_disconnect($connection) {
  11. if(isset($connection)) {
  12. mysqli_close($connection);
  13. }
  14. }
  15.  
  16. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement