Advertisement
EnggarHakim

MySQL Connector

Jun 1st, 2014
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.60 KB | None | 0 0
  1. <?
  2. /* MySQL Server IP */
  3. $_MySQL['HOST'] = '127.0.0.1';
  4.  
  5. /* MySQL Username */
  6. $_MySQL['USER'] = 'User-001';
  7.  
  8. /* MySQL Password */
  9. $_MySQL['PASS'] = '123456789';
  10.  
  11. /* MySQL Database */
  12. $_MySQL['DB'] = 'Database-001';
  13.  
  14. /* Do not edit anything below!
  15.    Connecting to MySQL..       */
  16. if(!mysql_connect($_MySQL['HOST'], $_MySQL['USER'], $_MySQL['PASS'])){
  17.     echo 'Error connecting to MySQL!'; exit;
  18. }
  19.  
  20. /* Selecting the Database..  */
  21. if(!mysql_select_db($_MySQL['DB'])){
  22.     echo 'Error Selecting the Database!'; exit;
  23. }
  24.  
  25. /* Connected!
  26.    Undoing the MySQL variable.. */
  27. unset($_MySQL);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement