You have a problem:
INSERT INTO CharactersN (name,desc,img)
desc
is a reserved word, so you should use a βnotationβ that looks like this:
INSERT INTO CharactersN (`name`,`desc`,`img`)
It is recommended that you use this notation for field names each time (or never use reserved words for field names in your database design).
Also, read SQL Injection because your code indicates that you are not aware of this. You insert values ββinto your request that come from outside (POST in this case).
VALUES ('$KTitle', '$Kcontent','$target')")
You should avoid these values ββfirst mysql_real_escape_string()
, or even better to use PDO to interact with the database.
from xkcd
source share