that code block does not give enough to go on, it is better if you compress the page to a zip archive and attach the zip file to your message so I can see the entire page code.
judging from the error though, it looks like you have a column in your table named "check" which is a reserved word by the MySQL server.
MySQL reserved words should be avoided when naming your tables and columns.
a full list of reserved words can be found here:
a common naming convention that I use to avoid this issue is:
-Table Names: use the plural on naming tables:
-Column Names: use the singular table name as a prefix to the column name.
-Both: Use camelCase to avoid illegal spaces, the underscore "_" can be used, but i don't recommend it.
using the singular table name as a prefix will ensure that you will never have 2 tables in your database that have the same name which can cause both errors and confusion. it will also prevent the posibily of using a reserved word. you will still need to be careful when naming the tables though.