| PHP Database Integration With MySQL |
|
|
|
| The Article - php | |||||||||
| Written by Chetankumar Akarte | |||||||||
| Wednesday, 07 March 2007 | |||||||||
Page 1 of 7 One of the defining features of PHP is the versatility it offers for connection to, and manipulation with, databases. In this article, we look at some features of the PHP and MySQL combination. We shall go through the following steps:-
Connect to MySQL Database Server:To work with the MySQL database, we first need to connect to MySQL Database Server. PHP provides mysql_connect() function to do this, and requires three strings as input: ‘hostname’, ‘username’ and ‘password’. Use Code-1 to connect to MySQL Database Server.
Code 1: test.php If your script has no error, then Code-1 gives output as:
Output 1: test.php |
|||||||||
| Last Updated ( Tuesday, 13 March 2007 ) | |||||||||