Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class SQL {
- public static function Connect($db) {
- $host = "your host";
- $user = "my username";
- $pass = "my pass";
- $conn = mysql_connect($host, $user, $pass, $db);
- return $conn;
- }
- }
- //usage?
- $sql = SQL::Connect("users"); //connected to the database users
- $sql->query("INSERT INTO users .... .. .. . .");
- $sql->close();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement