Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $host="...."; // Host name
- $username="...."; // Mysql username
- $password="......."; // Mysql password
- $db_name="...."; // Database name
- // Connect to server and select databse.
- mysql_connect("$host", "$username", "$password")or die("cannot connect");
- mysql_select_db("$db_name")or die("cannot select DB");
- ?>
- another php file:
- <?php
- include('config.php');
- ...
- sql query
- ...
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement