Somewhere earlier in your code, have you already selected your database using the mysql_select_db() function? Also, did you use the function mysql_connect() or mysql_pconnect() to contain all of your db connection settings?
If this is news to you, the PHP manual can give you some snippets of correct usage:
www.php.net/mysql_select_db
www.php.net/mysql_connect
To run the query:
www.php.net/mysql_query
By the way, is $dbms the variable containing the database that you wish to connect to? If yes, you should connect to something other than the "mysql" database that is created when you install MySQL. Just to be on the safe side.
Lastly, your query is almost correct. When you name specify your columns, they cannot all contain the same name. I don't know if you did that intentionally or unintentionally. Look at my previous post and notice how I distinguished one column name from the other.