Guest User

Untitled

a guest
Jul 17th, 2016
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. <?php
  2. $host = "localhost";
  3. $username = "root";
  4. $password = "_";
  5. $dbname = "wnusti";
  6. //create connection
  7.  
  8. $conn = mysqli_connect($host,$username,$password);
  9. $db = mysqli_select_db($conn,$dbname)
  10. or die(mysqli_error($conn));
  11. echo'<script type="text/javascript"> alert("Successfully Connected!")</script>';
  12.  
  13. if(!$conn) {
  14. die("Connection Failed!".mysqli_connect_error());
  15. } ?>
Add Comment
Please, Sign In to add comment