In the below form i am loading question and answers from mysql database based on asset title value and submitting dynamic custom questions value to database. ( this
I think doing mistake here
if($query === TRUE)
You can do as
if($query){//you message}else{//error message}