PHP Tutorial : PHP & MySQL
PHP Tutorial : PHP & MySQL In this PHP Tutorial you will learn about PHP and MySQL – Connecting to MySQL, Closing a connection, Selecting a database, Executing a query, Inserting data and Retrieving data. Connecting to MySQL: To connect to MySQL database server, use the function mysql_connect(). mysql_connect() takes three string arguments, the hostname, the username, and the password. mysql_connect() returns an integer represents the connection index if the connection is successful, or returns false if the connection fails. Example: <?php $con = mysql_connect(“localhost”, “john”, “smith”); echo $con; ?> Closing…
Read More