Jump to content

Archived

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

alrave

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

 

Share this post


Link to post
Share on other sites

×

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.