2
Contributors
8
Replies
74
Views
2 Years
Discussion Span
Last Post by Faiz97
0

Hi Guys. whenever the connecting code in PHP to MSSQL error comes when I can

fatal error call to undefined function mssql_connect()

please please please guys help meee.

1

Try the below and let me know

<?php
    $objConnect = mssql_connect("localhost","sa","");
    //$objConnect = mssql_connect($host,$user,$pass);

    //$host = server,ip,computer-name
    //$user = user
    //$pass = password
    if($objConnect)
    {
        echo "Database Connected.";
    }
    else
    {
        echo "Database Connect Failed.";
    }

    mssql_close($objConnect);
?>
Votes + Comments
Be nice to get feedback
0

What should I do now. This project is very important

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.