JH has it right - your function has no idea what $host, $user, and $pass
are, because they're out of scope. Add the global statements that
Jonathan suggested inside your dbConnect function, and all will be well.
Dave Watkinson wrote:
> function dbConnect (){
> $link = mysql
an's on the
case with the IP Address thing ... I'll see what I can do about users
and stuff. I'm running Win2K here :-(
Cheers
Dave
-Original Message-
From: Jonathan Hilgeman [mailto:[EMAIL PROTECTED]]
Sent: 31 August 2001 21:55
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB
So I added another user for the boxes hostname and it works fine
You must not have localhost users.
You get what I mean?!?!?
Dan
> --
> From: Dave Watkinson
> Sent: Friday, August 31, 2001 3:25 PM
> To: PHP-DB List (E-mail)
> Subject: RE:
problem has still got me
confused!!!
Dave
-Original Message-
From: Brunner, Daniel [mailto:[EMAIL PROTECTED]]
Sent: 31 August 2001 21:32
To: Dave Watkinson
Subject: RE: [PHP-DB] Weird Problem In mysql_connect();
Hello!!
Have your tried to echo the $host??
like
$host=123.100.321.
st 31, 2001 3:25 PM
> To: PHP-DB List (E-mail)
> Subject: RE: [PHP-DB] Weird Problem In mysql_connect();
>
> yeah - everything's fine! All the variables are being stored, but
> they're not getting passed to mysql_connect() for some really strange
> reason!
>
>
t required
file (!), and it's working, but the original problem has still got me
confused!!!
Dave
-Original Message-
From: Brunner, Daniel [mailto:[EMAIL PROTECTED]]
Sent: 31 August 2001 21:32
To: Dave Watkinson
Subject: RE: [PHP-DB] Weird Problem In mysql_connect();
Hello!!
Have yo
Hey all
I can connect with $conn =
mysql_connect("IP_Address","username","password");
but I can't connect with
$host = "IP_Address";
$user = "username";
$pass = "password";
$conn = mysql_connect($host,$user,$pass);
Any ideas? All I get is "Can't connect to MySQL Server on 'loca