The Snippets Thread
10-02-2011, 11:35 PM,
#2
RE: The Snippets Thread
This snippet is supposed to connect you to a mysql server and database using the basic mysql functions.
PHP Code:
<?php 
$config
['mysqluser'] = "USERNAME";
$config['mysqlpass'] = "PASSWORD";
$config['mysqldatabase'] = "DATABASE";
$config['mysqlhost'] = "HOST";

mysql_connect($config['mysqlhost'],$config['mysqluser'],$config['mysqlpass']) or die(mysql_error());
mysql_select_db($config['mysqldatabase']) or die(mysql_error()); 
With love,
HiddenKnowledge
A.k.a. Yoruichi Shihouin

If you have any questions, feel free to contact me trough email or pm. :)
Reply


Messages In This Thread
The Snippets Thread - by MyDigitalpoint - 08-15-2011, 12:00 PM
RE: The Snippets Thread - by HiddenKnowledge - 10-02-2011, 11:35 PM
RE: The Snippets Thread - by MyDigitalpoint - 10-20-2011, 08:24 AM
RE: The Snippets Thread - by Zach - 10-20-2011, 09:37 AM
RE: The Snippets Thread - by Arthur - 10-27-2011, 01:40 PM
RE: The Snippets Thread - by Zach - 10-27-2011, 02:42 PM
RE: The Snippets Thread - by Arthur - 10-27-2011, 09:01 PM
RE: The Snippets Thread - by Serial Thrilla - 01-18-2012, 02:33 AM
RE: The Snippets Thread - by Arthur - 04-12-2012, 07:28 AM

Forum Jump: