Hey

I'm fairly new to OOP programming but I'm having a hard time understanding what __construct() does.

For example, I want to write a MySQL class, would I do this:

PHP Code:
<?php
class mysql
{
    
    private 
$databaseName;
    private 
$databaseHost;
    private 
$databaseUser;
    private 
$databasePass;
    
    function 
__construct($databaseName$databaseHost$databaseUser$databasePass)
    {
        
mysql_connect($database .. etc)
    }
    
}
?>
Or do I simply just do function connect($databaseName) .. etc

It wouldn't suprise me if I'm not supposed to do either

Can anyone shed some light?