How To: Connect MySQL database through PHP connection string

Collapse

Unconfigured Ad Widget

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Shane
    Senior Member
    • Jun 2006
    • 264

    How To: Connect MySQL database through PHP connection string

    Hello All,

    Below mentioned is the connection string through which one can connect MySQL database with PHP code:

    ----------------------------------------------------
    <?
    // connect to the database
    mysql_connect ('server name', 'username', 'password');
    mysql_select_db ('database name');
    ?>
    Connected successfully
    ----------------------------------------------------

    Thanks,

    Shane G.
    AccuWebHosting.Com
Working...
X