On Monday 04 February 2002 10:54 am, you wrote: > Hi all, > > Ok I am learning this on my own but I could use some help. > I have started these two pages test.php and config.php here is the code: > > test.php > > <? > // include the database configuration > include "config.php";
In looking at my "include" page I noticed there were parenthisis around the include statement, maybe this is your problem. include("header.inc"); > // connect to database > mysql_connect($db["host"],$db["user"],$db["password"],$db["database"]) or > die ("sorry not successful"); > > // if no connect then exit > exit; > > // if connect successful > echo ("you have connected"); > ?> > > config.php > > <? > > // database config > $db["host"] = "localhost"; > $db["user"] = "me"; > $db["password"] = "mypassword"; > $db["database"] = "mydb"; > > ?> > > All I'm trying to do is successfully connect to the database but it returns > "sorry not successful". What have I done wrong? > I have gone straight from the php pocket reference manual and it doesn't > work. Would someone please explain what has happened? > > Thanks > J Leonard -- Ken Thompson, North West Antique Autos Payette, Idaho Email: [EMAIL PROTECTED] http://www.nwaa.com Sales and brokering of antique autos and parts. Linux- Coming Soon To A Desktop Near You Registered Linux User #183936 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php