on 25/08/2003 12:11 PM, John W. Holmes at [EMAIL PROTECTED] wrote:

> Mjec wrote:
> 
>> Hi,
>> 
>> again this line is causing problems:
>> 
>> $h = 
>> mysql_connect('localhost',constant("mysql_user"),constant("mysql_password"))
>> ;
>> 
>> Aparantly a parse error.  Idaes?
> 
> Is there a reason you're using constant()??
> 
> Try: $h = mysql_connect('localhost', mysql_user, mysql_password);
> 
> One thing to note about parse errors. If PHP says you have a parse error
> on line 8 (for example), that means there is an error somewhere before
> OR on line 8. The line PHP gives is just the point where it realized
> something was wrong, but the cause could be on a previous line.

Error line 43 (or 42 if 43 commented out and 42 uncommented)

 38:     define("mysql_password", "did you think");
 39:     define("mysql_user", 'i would say this');
 40: 
 41:     // Initialize MySQL database
 42: //    $h = 
mysql_connect('localhost',constant("mysql_user"),constant("mysql_password"))
;
 43:     $h = mysql_connect('localhost',mysql_user,mysql_password);
 44:     mysql_select_db('mjec_mjecnet', $h);

ideas?

--mjec

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to