How to connect SQL server with PHP ?

5 replies
Hi

Please help me to connect SQL server 2005 with PHP website, I am not getting connection and can't execute queries with that
#connect #php #server #sql
  • Profile picture of the author Ken Durham
    What have you tried so far? Any errors?

    PHP: mssql_connect - Manual
    Signature

    yes, I am....

    {{ DiscussionBoard.errors[2717083].message }}
  • Profile picture of the author mrchristo
    could you be more specific?

    just a question.....why SQL2005?
    mysql is a better option.......even pluging .net into mysql is quite easy
    {{ DiscussionBoard.errors[2718132].message }}
  • Profile picture of the author mogol87
    be more specific so that we can help you.
    {{ DiscussionBoard.errors[2718890].message }}
  • Profile picture of the author jminkler
    Originally Posted by dewshare View Post

    Hi

    Please help me to connect SQL server 2005 with PHP website, I am not getting connection and can't execute queries with that
    If your using PDO you can

    $dbh = new PDO ("mssql:host=$hostname;dbname=$dbname","$username" ,"$pw");
    {{ DiscussionBoard.errors[2719119].message }}

Trending Topics