Good idea to check the manual at php.net or zend.com... It explains very well how to do things with php... for people who are learning too.
Check out the mysql articles on phpbuilder.com and devshed.com too.
Code below: NOT checked!
$sDbHost = "localhost";
$sDbUser = "username";
$sDbPass = "password";
$sDbName = "yourdbname";
mysql_connect($sDbHost, $sDbUser, $sDbPass)
or DIE("".mysql_error());
/it's always usefull to shove meaningfull DIE statment/
mysql_select_db($sDbName)
or DIE("".mysql_error());
mysql_query("INSERT INTO tablename (colum_one, column_two) VALUES ("table", "chair")")
or DIE("Mysql Insert failed... crap!: ".mysql_error());
Theres somthing for ya. Learn mysql syntax at http://www.mysql.com/documentation/
Billy