* Miles Thompson ([EMAIL PROTECTED]) [Jan 27. 2002 19:55]:

Hi Miles,


> $hostname = "";
> $user = "username";
> $password = "password";
> $dbname = "database";

> and change your connection string as follows:
>      include 'params.inc';
>     //maybe some other stuff her
>     $conn = mysql_connect( '$hostname', '$user', '$password');
>     mysql_select_db('$dbname',$conn) or die( mysql_errno()." : 
> ".mysql_error());

Careful there.

'$hostname', '$user', '$password', and '$dbname' aren't interpolated.
They're literally taken as the string $hostname, etc.

Leave off the 's or surround the variables in double quotes. But you
know that. ;-D

Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
Always proofread carefully to see if you

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to