I'm using a config.php file which i use in my database class to change the values however this warning...
makes be believe that the functions are not picking up the values in teh config file. Could someone explain if i am not doing something right?Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/creative/public_html/demo1/classes/database.class.php on line 16
Thanks
PHP Code:<?php
ob_start();
session_start();
// The $siteURL is the full URL of where the current site is...
$site = 'demo1';
// Database username, host, password and name
$default_dbname = '*****';
$dbhost = 'localhost';
$dbusername = '*****';
$dbpassword = '*****';
?>PHP Code:<?php
require ('../config.php');
class database
{
function databaseConnection()
{
$link_id = '';
$link_id = mysql_pconnect($dbhost,$dbusername,$dbpassword);
if (!$link_id){
$MYSQL_ERRNO = 0;
$MYSQL_ERROR = "Connection Failed to the host".$dbhost."";
return 0;
}
else if (!mysql_select_db($default_dbname)){
$MYSQL_ERRNO = mysql_errno();
$MYSQL_ERROR = mysql_error();
return 0;
}
}
function sql_error()
{
if(empty($MYSQL_ERROR)){
$MYSQL_ERRNO = mysql_errno();
$MYSQL_ERROR = mysql_error();
}
return "$MYSQL_ERRNO: $MYSQL_ERROR" ;
}
function siteurl()
{
return $this->$site;
}
function setSiteUrl($site)
{
$this->site = $site;
}
}
?>






Bookmarks