Don't do it like that!
Your code is vulnerable to
SQL Injection[
^].
NEVER use string concatenation to build a SQL query.
ALWAYS use a parameterized query.
PHP: SQL Injection - Manual[
^]
As to your error message, it indicates that you're trying to insert data which is longer than the maximum length of the column. You'll need to debug your code to see what data is being sent, and update your database schema accordingly.