RE: [PHP-DB] problem with functin newbie please help

From: Date: Sun, 29 Apr 2001 15:35:23 +0000
Subject: RE: [PHP-DB] problem with functin newbie please help
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-8969@lists.php.net to get a copy of this message
Hi Greg, In config.php, line 6 needs a semi-colon on the end. Try that and see if it does the trick. Tyrone -----Original Message----- From: Greg Kelly [mailto:gkelly455@ameritech.net] Sent: Sunday, April 29, 2001 11:28 AM To: php-db@lists.php.net Subject: [PHP-DB] problem with functin newbie please help I have a function that I have defined in a filed called config.php. name of function is dbconnect() when I go to call the function I get a Parse error: parse error in /home/test/public_html/include/config.php on line 9 Fatal error: Call to undefined function: dbconnect() in /home/test/public_html/login.php on line 5 Can some please tell me what i am doing wrong ? Thank You index.php <?php require("include/config.php"); include("include/register.php"); include("include/login.php"); dbconnect(); ?> config.php <?php $boardurl = "/var/www/html/contest"; $hostname = "localhost"; $user = "test"; $password = "test"; $database = "test"; $boardname= "test" function dbconnect() { global $hostname, $user, $password, $database; mysql_connect($localhost,$user,$password) or die ("Unable to connect to MYSQL SERVER"); mysql_select_db($database) or die ("Unable to connect to database please try back later"); } ?> -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#8969) next »