Hi, wondered if anyone can help I have followed this: sitepoint.com/article/php-gallery-system-minutes/ and built the basic gallery thing, works fine. But I am basically trying to get the add new category to work and I can't work out a way to implement it and get it working with the snippet given:

function add_category( $category_name )
{
mysql_query( "INSERT INTO gallery_category(`category_name`) VALUES('".addslashes( $category_name )."' )" );
}

Call: add_category( “Category Name” );

Can anyone explain how I would implement this?