Advertisement
mvsp

db_connect.php

Jul 7th, 2021
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.32 KB | None | 0 0
  1. <?php
  2. //Conexão com banco de dados
  3. $servername = "localhost";
  4. $username = "root";
  5. $password = "";
  6. $db_name = "crud";
  7.  
  8. $connect = mysqli_connect($servername,$username,$password,$db_name);
  9. mysqli_set_charset($connect,"utf8");
  10.  
  11. if(mysqli_connect_error() ):
  12.     echo "Erro na conexão: ".mysqli_connect_error();
  13. endif;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement