alrave Posted May 27, 2005 Share Posted May 27, 2005 im new to php and im trying to connect to sql server, im using the following code: <?php $sqlserver = 'localhost'; $sqluser = 'sa'; $sqlpass = ''; $connex = mssql_connect(&sqlserver, &sqluser, &sqlpass); if ($connex) { echo 'im in'; } ?> it gives me the following error Parse error: parse error, expecting `T_VARIABLE' or `'$'' in c:\inetpub\wwwroot\test\test1.php on line 15 line 15 would be : $connex = mssql_connect(&sqlserver, &sqluser, &sqlpass); any help would be appreciated Quote Link to comment https://forums.phpfreaks.com/topic/2326-need-help-connecting-to-sql-server/ Share on other sites More sharing options...
StarBuck Posted June 1, 2005 Share Posted June 1, 2005 surely u should put '$' instead of the '&' Quote Link to comment https://forums.phpfreaks.com/topic/2326-need-help-connecting-to-sql-server/#findComment-7660 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.