[PHP-DB] Weird Problem In mysql_connect();

2001-08-31 Thread Dave Watkinson
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 'localhost',

RE: [PHP-DB] Weird Problem In mysql_connect();

2001-08-31 Thread Dave Watkinson
(!), 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 your tried to echo

RE: [PHP-DB] Weird Problem In mysql_connect();

2001-08-31 Thread Brunner, Daniel
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! :-( I've done a temporary fix - moved the entire database

Re: [PHP-DB] Weird Problem In mysql_connect();

2001-08-31 Thread Jonathan Hilgeman
! 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.1 echo $host; Dan -- Fr

RE: [PHP-DB] Weird Problem In mysql_connect();

2001-08-31 Thread Dave Watkinson
To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Weird Problem In mysql_connect(); You mean you had all this inside a function? Like: function dbConnect () { $link = mysql_connect($host,$user,$pass); } ? If so, did you pass $host, $user, and $pass to the function by global-ing them like: function

Re: [PHP-DB] Weird Problem In mysql_connect();

2001-08-31 Thread Chris Hobbs
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 =