I was working on my XAMPP local server and coding php using netbeans, the below code was working fine.
$sql = "INSERT INTO enneagram (name,course,activity,type,Peacemaker,Loyalist,Achiever,Reformer,Individualist,Helper,Challenger,Investigator,Enthusiast,Instinctive,Feeling,Thinking,Assertive,Dutiful,Withdrawn) VALUES ('$answerdata[0]','$answerdata[1]','$answerdata[2]','$mytypes',$A,$B,$C,$D,$E,$F,$G,$H,$I,$instinctive,$feeling,$thinking,$assetive,$dutiful,$withdrawn)";
I uploaded the file on online server and now it is giving me this error
'Connection failed: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near \'. VALUES (\'Karim Bahsoun\',\'communication\',\'activity\',\'|Loyalist|Individualis\' at line 1'
it's my third day looking at the code and not realizing why it worked offline and not online.