What have you done to isolate the various steps and logically identify where the problem actually lies?
Did the text ever leave the client?
Did your form handler receive the text? Prove it.
Why did the text not go into your database?
Was the query valid?
Did the logic run?
What is in your PHP error files?
What is in your Mysql log files? Is it valid?