Advertisement
Guest User

Untitled

a guest
Jul 19th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.44 KB | None | 0 0
  1. <?php
  2. $servername = "localhost"; //replace it with your database server name
  3. $username = "root";  //replace it with your database username
  4. $password = "";  //replace it with your database password
  5. $dbname = "student";
  6. // Create connection
  7. $conn = mysqli_connect($servername, $username, $password, $dbname);
  8. // Check connection
  9. if (!$conn) {
  10.     echo("Connection failed: " . mysqli_connect_error());
  11. }
  12.  
  13. else {
  14.     echo("Connected ");
  15. }
  16. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement