Re: Another Newbie Question

From: Date: Wed, 10 Apr 2002 18:43:22 +0000
Subject: Re: Another Newbie Question
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-13005@lists.php.net to get a copy of this message
I recommend using mysql_error() to see what the problem is. I/e: mysql_connect('nik', '', '') or die('Could not connect: '.mysql_error()); mysql_select_db_('guestbook') or die('Could not select: '.mysql_error()); Something like that.. At 12:56 PM 4/10/02 -0300, Nik Alleyne wrote:
Good evening everyone, I am new (very new) to php. I was doing some research on the net and learn of this packaged and after reading just a couple of pages, i figure i should learn this instead of ASP. It looks so easy. Anyhow here is my problem. I am trying to connect to the database (MySQL) however, I can't I am connecting to the server, but I cannot connect to my sample database. Here is my script? <?php mysql_connect("nik", "", "") or die("could not connect to the database"); mysql_select_db("guestbook") or die ("could not connect to the specified database"); ?> I'm getting the "could not connect to the specified database" message. P.S. The database exists. Please Help Thx Nik -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
-- Mike Flynn -- mike @ mikeflynn . net home => work => home => shop => home [adbusters]

« previous php.windows (#13005) next »