Free Web Hosting with No Ads
Support Forums
Free Web Hosting Signup
Free Forum Hosting
FREE HOSTING SERVICES MEMBERS LOGIN MESSAGE BOARD FAQ
Free Web Hosting
Free Hosting
Sign Up Now
Free PHPBB
Free File Host
Free Image Host
Free Blog
Webmaster Tools
Members Login
Paid Hosting
Buy Domains
Resources
FAQ
Link Directory
Terms of Use
Contact Us
Tell a Friend



Home > FAQ > MySQL > MySQL Connection

How do I connect to my MySQL database using PHP ?

To connect from a PHP script, just put this in your file:

<?php
mysql_connect("localhost", "DB_USER_NAME", "DB_PASSWORD");
mysql_select_db("DB_NAME");
?>

Where:
DB_USER_NAME is your MySQL Database user name.
DB_PASSWORD is your MySQL Database Password.
DB_NAME is your MySQL Database Name.

You can find these information by loging into your members area at:
 
http://www.netfreehost.com/login.php.


Make Money Easy
© 2005-2010 NetFreeHost.com All Rights Reserved.