Connecting to MySQL with PHP
Download the authoritative guide: Data Center Guide: Optimizing Your Data Center Strategy
Download the authoritative guide: Cloud Computing: Using the Cloud for Competitive Advantage[ Thanks to Tre Harmon for this link. ] Excerpt: In this scriptlet, we will cover how to connect to MySQL with PHP.
In this scriptlet, we will cover how to connect to MySQL with PHP.
This scriptlet is not intended to cover all of the possibilities of PHP and MySQL interaction. It is to help with the understanding of making the database connection.
First, we make the connection using the PHP function mysql_connect() The 3 arguments we'll be passing to the function are:
1. MySQL Server Hostname - This will typically be localhost, unless you're using a remote database.
2. MySQL user name - The user name with access to the db.
3. MySQL user password - The password for said user name.
IT Solutions Builder TOP IT RESOURCES TO MOVE YOUR BUSINESS FORWARD
Which topic are you interested in?
What is your company size?
What is your job title?
What is your job function?
Searching our resource database to find your matches...