The attend/primary profile insert info You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '3667,'profile',1004,'125.00')' at line 2 INSERT INTO cart(user_reg_userid,contentid,content_type,event_eventid,fee_amount) VALUES (,3667,'profile',1004,'125.00') the regid : 0 the sql: INSERT INTO registration(user_reg_userid,event_eventid,date_and_time,primary_regid, entry_mode, adm_id) VALUES (,1004,'2017-04-03 11:46:24','0', 'self',0)