Advertisement
Guest User

asd

a guest
Mar 16th, 2016
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. <?php
  2.  
  3. $mysql_host = 'localhost';
  4. $mysql_user = 'samscom_sams';
  5. $mysql_pass = 's@ms2016';
  6. $mysql_db = 'samscom_sams';
  7.  
  8. if(@mysql_connect($mysql_host,$mysql_user,$mysql_pass)){
  9. if(@mysql_select_db($mysql_db)){
  10.  
  11. }else{
  12. die('Couldn\'t find the database.');
  13. }
  14.  
  15. }else{
  16. die('Couldn\'t find the server.');
  17. }
  18.  
  19. function chkconnection(){
  20. $conn = @mysql_connect($mysql_host,$mysql_user,$mysql_pass) or die ("Journey to Database is Impossible, too many tolls");
  21. return $conn;
  22. }
  23.  
  24. function journeyTodb(){
  25. @mysql_select_db("osops") or die( "Database are not found in your life");
  26. //return 'Well, the database is in ur life now';
  27. }
  28.  
  29. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement