Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $dbName = 'dbname';
- $host = 'host';
- $username = 'username';
- $password = 'password';
- $secretGameKey = "censure";
- $secretServerKey = "censure";
- function dbConnect()
- {
- global $dbName;
- global $host;
- global $username;
- global $password;
- $link = mysql_connect($host, $username, $password);
- if(!$link)
- {
- fail("Couldn�t connect to database server");
- }
- if(!@mysql_select_db($dbName))
- {
- fail("Couldn�t find database $dbName");
- }
- return $link;
- }
- function safe($variable)
- {
- $variable = addslashes(trim($variable));
- return $variable;
- }
- function fail($errorMsg)
- {
- print $errorMsg;
- exit;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement