I2aTe Posted July 4, 2011 Share Posted July 4, 2011 help i keep getting this error and dont know how to fix it:/ this is the original ch21_include content....... <?php function doDB() { global $mysqli; $mysqli = mysqli_connect("mysql9.000webhost.com" , "a3165211_1" , "xxxxxx" "a3165211_Forum"); if (mysqli_connect_errno()) { printf("connect failed: %s\n" , mysqli_connect_errno()); exit(); } } ?> Quote Link to comment https://forums.phpfreaks.com/topic/241027-parse-error-syntax-error-unexpected-t_constant_encapsed_string-in-homea31652/ Share on other sites More sharing options...
void Posted July 4, 2011 Share Posted July 4, 2011 "xxxxxx", "a3165211_Forum"); i think it isn't that difficult to trace an error like that, especially when you have a line number. Quote Link to comment https://forums.phpfreaks.com/topic/241027-parse-error-syntax-error-unexpected-t_constant_encapsed_string-in-homea31652/#findComment-1238034 Share on other sites More sharing options...
I2aTe Posted July 4, 2011 Author Share Posted July 4, 2011 the "xxxxxx" is y password for the database and the "a3165211_Forum" is what the database is called Quote Link to comment https://forums.phpfreaks.com/topic/241027-parse-error-syntax-error-unexpected-t_constant_encapsed_string-in-homea31652/#findComment-1238035 Share on other sites More sharing options...
QuickOldCar Posted July 4, 2011 Share Posted July 4, 2011 you missed the answer, let me highlight it in red. "xxxxxx", "a3165211_Forum"); Quote Link to comment https://forums.phpfreaks.com/topic/241027-parse-error-syntax-error-unexpected-t_constant_encapsed_string-in-homea31652/#findComment-1238038 Share on other sites More sharing options...
I2aTe Posted July 4, 2011 Author Share Posted July 4, 2011 okaay thankyou but now i get this.... Warning: mysqli_connect() [function.mysqli-connect]: (28000/1045): Access denied for user 'a3165211_1'@'10.1.1.32' (using password: YES) in /home/a3165211/public_html/ch21_include.php on line 6 Quote Link to comment https://forums.phpfreaks.com/topic/241027-parse-error-syntax-error-unexpected-t_constant_encapsed_string-in-homea31652/#findComment-1238039 Share on other sites More sharing options...
mikesta707 Posted July 4, 2011 Share Posted July 4, 2011 that means your login information is incorrect. Quote Link to comment https://forums.phpfreaks.com/topic/241027-parse-error-syntax-error-unexpected-t_constant_encapsed_string-in-homea31652/#findComment-1238050 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.