Scripting & Programming

PHP MySQL connection simple script

Before you can access and work with data in a database, you must create a connection to the database. In PHP, this is done with the mysql_connect() function. Syntax mysql_connect(servername,username,password);   Parameter Description servername Optional. Specifies the server to connect to. Default value is “localhost:3306” username Optional. Specifies the username to log in with. Default […]