View Single Post
  #3  
Old 31st July 2008, 14:20
empereur empereur is offline
Senior Member
 
Join Date: Mar 2008
France
Posts: 50
Question PHP Code:???
Quote:
Originally Posted by bestmd View Post
Try this function:
PHP Code:
function dbconn($autoclean false$lightmode false) {
    global 
$mysql_host$mysql_user$mysql_pass$mysql_db$mysql_charset;

    if (!@
mysql_connect($mysql_host$mysql_user$mysql_pass))
        die(
"[" mysql_errno() . "] dbconn: mysql_connect: " mysql_error());

    
mysql_select_db($mysql_db)
        or die(
"dbconn: mysql_select_db: " mysql_error());

    
mysql_query("SET NAMES $mysql_charset");

    
userlogin($lightmode);

    if (
basename($_SERVER['SCRIPT_FILENAME']) == 'index.php')
        
register_shutdown_function("autoclean");

    
register_shutdown_function("mysql_close");


:the3:
this code it finds in which file so that I can the controlling
Reply With Quote