Advertisement
Guest User

Untitled

a guest
Apr 3rd, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. <?php
  2.  
  3. //I wonder...
  4. $SQLhostName = 'mysql.hostinger.ru';
  5. $SQLuserName = 'u296353873_stuck';
  6. $SQLpassword = 'rjn05*03';
  7. $SQLlocalDatabase = 'u296353873_after';
  8. $SQLglobalDatabase = 'u296353873_after';
  9.  
  10.  
  11. $SQLconnect = mysql_connect($SQLhostName, $SQLuserName, $SQLpassword);
  12.  
  13.  
  14.  
  15. if (!$SQLconnect) {
  16. die('Could not connect: ' . mysql_error());
  17. }
  18. else{
  19. }
  20. //
  21. $con = $SQLconnect;
  22. // Server: Database:
  23.  
  24. function db_select_local() {
  25. $db_selected = mysql_select_db($SQLlocalDatabase, $SQLconnect);
  26. if(!$db_selected) {
  27. die('could not connect to the local mysql database: '.mysql_error());
  28. }
  29. }
  30.  
  31. function db_select_global() {
  32. $db_selected = mysql_select_db($SQLglobalDatabase, $SQLconnect);
  33. if(!$db_selected) {
  34. die('could not connect to the global mysql database: '.mysql_error());
  35. }
  36. }
  37.  
  38. db_select_global();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement