Guest User

Untitled

a guest
May 11th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. username="abc"
  2. password="123"
  3.  
  4. <?php
  5. define ('DB_HOST','localhost');
  6.  
  7. define ('DB_USER','root');
  8.  
  9. define ('DB_PASS','');
  10.  
  11. define ('DB_NAME','schools');
  12.  
  13. $con=mysqli_connect(DB_HOST,DB_USER,DB_PASS,DB_NAME);
  14.  
  15.  
  16. // Check connection
  17. if (mysqli_connect_errno())
  18.  
  19. {
  20. echo "Failed to connect to MySQL: " . mysqli_connect_error();
  21. }
  22. else{
  23. //echo"successfully connect";
  24. }
  25. ?>
Add Comment
Please, Sign In to add comment