Re: Another Newbie Question
| From: | Nik Alleyne | Date: | Wed, 10 Apr 2002 19:29:22 +0000 |
| Subject: | Re: Another Newbie Question | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-13037@lists.php.net to get a copy of this message | ||
Thankx a million. It worked!
"Court Shrock" <ShrockC@inhs.org> wrote in message
news:25E1EA6CA52DD311A525009027725B5504142682@exchange1.inhs.org...
> Are you sure that the database server is called 'nik'.....if the same
system
> is both your web server and database server, I would recommend replacing
> 'nik' with 'localhost'. I am thinking that your mysql_connect() should be
> as follows:
>
> mysql_connect('localhost', 'nik', '');
> //connect to localhost as the user, nik, with no password
>
> > -----Original Message-----
> > From: Nik Alleyne [mailto:nik@guyanachronicle.com]
> > Sent: Wednesday, April 10, 2002 8:56 AM
> > To: php-windows@lists.php.net
> > Subject: [PHP-WIN] Another Newbie Question
> >
> >
> > 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
> >