Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //We start by defining some variables for use during connection
- $mysql_host = "127.0.0.1";
- $mysql_username = "martin8412dk";
- $mysql_password = "";
- $mysql_database = "martin8412dk";
- function connect() {
- //Connect to database
- if(!$link = mysql_connect($mysql_host, $mysql_username, $mysql_password)) {
- die(mysql_error());
- }
- //Select database
- if(!$db = mysql_select_db($mysql_database, $link)) {
- die(mysql_error());
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement