Jump to content

need help connecting to sql server


Recommended Posts

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

 

Link to comment
https://forums.phpfreaks.com/topic/2326-need-help-connecting-to-sql-server/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.