desc is a reserved keyword (short for DESCENDING in ORDER BY).
desc
DESCENDING
ORDER BY
Enlose it into backticks:
INSERT INTO ideas (title,`desc`) VALUES ('$title','$desc');