I think it might be your query, I've never seen any query written like that in php only in mysql but I might be wrong. Maybe someone could clarify??
Also I noticed you got your
<form> after the closing
Also, what error message are you getting?