I'm trying to create an action for an onclick event, while this works perfectly fine:
onclick="gts('he', '', '<?=$c->email?>', function(data) {register_transaction(data,data);})"
this gives me a syntax error after the register_transaction( bit:
onclick="gts('he', '', '<?=$c->email?>', function(data) {register_transaction(data,'2');})"
(I put the constant '2' value as the second parameter of register_transaction()). Every quoted constant I put there generates this error.