Advertisement
Guest User

connect.php

a guest
Feb 14th, 2016
85
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. $host = "localhost";
  3. $user = "root";
  4. $pass = "";
  5. $db = "database";
  6.  
  7. $conn = mysqli_connect("$host","$user","$pass","$db");
  8. $sql = mysqli_select_db($conn, $db);
  9.  
  10. if($sql){
  11. $msgm = "Sucesso ao acessar banco de dados !";
  12. }else{
  13. $msgm = "Erro ao acessar o banco de dados !";
  14. }
  15. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement