auzz Posted April 22, 2011 Share Posted April 22, 2011 This is the error.. Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$' in /htdocs/testing//suggest.php on line 35 ..and this is line 35 in suggest.php... mysql['username'],$mysql['password']); could you point me in the right direction?. Thanks. edit - oh, and the context of the code is... mysql_connect($mysql['host'],$ mysql['username'],$mysql['password']); mysql_select_db($mysql['db']); Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted April 22, 2011 Share Posted April 22, 2011 The parentheses almost certainly don't belong after the semicolon. Post a few lines before and a few lines after line 35 also. Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted April 22, 2011 Share Posted April 22, 2011 We need to see more of your code. Ken Quote Link to comment Share on other sites More sharing options...
fugix Posted April 22, 2011 Share Posted April 22, 2011 There should be no $ in that line of code Quote Link to comment Share on other sites More sharing options...
auzz Posted April 22, 2011 Author Share Posted April 22, 2011 This is the error.. Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$' in /htdocs/testing//suggest.php on line 35 ..and this is line 35 in suggest.php... mysql['username'],$mysql['password']); could you point me in the right direction?. Thanks. edit - oh, and the context of the code is... mysql_connect($mysql['host'],$ mysql['username'],$mysql['password']); mysql_select_db($mysql['db']); Just updated my original post. Added the surrounding code. If you need more, then i'll post the intire lot? Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted April 22, 2011 Share Posted April 22, 2011 These two lines <?php mysql_connect($mysql['host'],$ mysql['username'],$mysql['password']); ?> should be written as one line <?php mysql_connect($mysql['host'],$mysql['username'],$mysql['password']); ?> Ken Quote Link to comment Share on other sites More sharing options...
fugix Posted April 22, 2011 Share Posted April 22, 2011 Yeah. Shoul be all one line without line breaks Quote Link to comment Share on other sites More sharing options...
auzz Posted April 22, 2011 Author Share Posted April 22, 2011 Thanks very much.. My problem is solved now. Quote Link to comment Share on other sites More sharing options...
fugix Posted April 22, 2011 Share Posted April 22, 2011 glad we could help Quote Link to comment 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.