Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /////////////////////////////////////////////////////////////////////////////////
- //Database connection
- /////////////////////////////////////////////////////////////////////////////////
- $host="localhost"; // the path to the database, usually localhost,
- $user="user-name"; // your login name, for this part set up a 'select' only user
- $password="your password"; // the password you set - no password is dangerous !!!
- $database='your database'; // The database you want to read
- $link = mysql_connect($host,$user,$password);
- if (!$link)
- {
- $host="the full host name of your server MySQL database";
- $link = mysql_connect($host,$user,$password);
- }
- if (!$link)
- {
- die("Unable to Connect to Server");
- }
- mysql_select_db ($database)or die ('Unable to Select Database ');
- /////////////////////////////////////////////////////////////////////////////////////////////
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement