[PHP] Impossible error
Hi, I have a 163 line file. I get a parse error on line 164. Ideas? Thanks, mjec -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] include () problems
Hi, When I run the line: include ("fnord.php"); with the file looking like: it prints out the return of fnord() (i.e. $msg). I've checked, and there's no echo or print statemetns anywhere... Oh, yeah, FYI, the pattern goes like this: file: index.php file: standard.php and it prints it right up the top of index.php, causing an error with the "header" statement (although it says the error is in fnord.php - which contains NO header statemtns). ideas? Regards, mjec -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql_connect error
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
[PHP] mysql_connect error
Hi, again this line is causing problems: $h = mysql_connect('localhost',constant("mysql_user"),constant("mysql_password")) ; Aparantly a parse error. Idaes? Thanks, Mjec -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] parse error with mysql_connect
Hi, I keep getting Parse Error on line 36, but I can't figure out why... relevant code: 35: // Initialize MySQL database 36: $h = mysql_connect('localhost','localhost',constant("mysql_user"),constant("mysql _password")); 37: mysql_select_db('mjec_mjecnet', $h); using PHP v. 4.3.2 Thanks, Mjec -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php