If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

The first thing to do is connect to the database.The function to connect to MySQL is called mysql_connect. This function returns a resource which is a pointer to the database connection. It's also called a database handle, and we'll use it in later functions. Don't forget to replace your connection details.

you really need to ignore the above post to use MYSQL or MYSQLI they are depricated in php5.3 adn GONE in php5.4

if you use mysql(i) you will Never be able to upgrade beyond php 5.3 unless you rewrite your script.

As I said before that statement is just not true. Traq wrote a very good post on this topic.

Mysql_connect is deprecated, but not removed in any version of php. Mysqli_connect is actively supported and encouraged and there are no plans to remove it for the foreseeable future. The same is true for PDO. reference scroll down to the comparison chart for the status on each of the three main methods for connecting to MySQL using php, which includes mysql_connect.