Sin descripción

dbh.inc.php 718B

12345678910111213141516171819202122232425
  1. <?php
  2. $dbServerName = "localhost"; // $_SERVER['NAME']
  3. $dbUsername = "proyecto_ema"; // $_SERVER['USER'] ? victor.hernandez17
  4. $dbPassword = "RUYCwNr2Xwah3PET"; // $_SERVER['PASSWORD'] ? cIMkSqsqXu1vkByz
  5. $dbName = "proyecto.ema.upr";//marle.prueba.desarrollo"; // Name of database ? proyecto.ema.upr
  6. $connection = mysqli_connect($dbServerName, $dbUsername, $dbPassword, $dbName) or die(mysqli_error());
  7. mysqli_set_charset($connection, "utf8");
  8. // mysqli_error() vs. mysqli_connect_error() vs. mysqli_connect_errno()
  9. /*
  10. public function connect() {
  11. mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
  12. $this->connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);
  13. }
  14. */