Posted By

angrytomato on 01/01/11


Tagged

mysql connect


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

angrytomato


mysql connect


 / Published in: PHP
 

  1. // mysql adatok
  2.  
  3. $db_host = "localhost";
  4.  
  5. $db_username = "root";
  6.  
  7. $db_password = "pw";
  8.  
  9. $db_name = "dbname";
  10.  
  11. // mysql query
  12.  
  13. mysql_connect("$db_host","$db_username","$db_password") or die("Hiba a kapcsolódás során.");
  14.  
  15. // select db
  16. mysql_select_db("$db_name") or die("Nincs ilyen adatbázis.");

Report this snippet  

You need to login to post a comment.