how can i check to see if a name already exists in the db.does mySQL have a facility to avoid duplicating entries?
If you define a unique index on the required fields, then yes.