go to
www.php.net and look up documentation and you will find functions to connect to database and manipulate it under mysql functions or msSql functions.If you usiong any other,that's there too!
you can also check out documentation at www.mysql.com if you are using mysql dbase