php mysql_connect function


php mysql_connect function

mysql_connect — Open a connection to a MySQL Server

This php function is used to connect to mysql database , mysql_connect function required three main parameters host name , database username and database password.


mysql_connect( ‘localhost’, ‘dbuser’, ‘dbpass’) or die(‘Could not connect to mysql server.’ );


Returns a MySQL link identifier on success, or FALSE on failure.

php help is the biggest php resource



  1. php mysql_close function « php help said

    […] $link = mysql_connect(’localhost’, ‘mysql_username’, ‘mysql_password’); // This line […]

  2. amitmondal said

    Nice tutorial….thanks for this post…..
    Please visit this link for learn more script.

RSS feed for comments on this post · TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: