Hi Guys, I want to check the following:
- I create an HTML Image type field.
- In this field we created a Ajax OnClick ejento
- In this event insert the following code
/ **
- Insert a record on another table
- /
sc_ajax_message (“Message”, “Title”);
{datetime_field} = date ('Y-m-d H: i: s ");
/ / SQL statement parameters
$ insert_table = ‘inscripcion_alumnos’, / / Table name
$ insert_fields = array (/ / Field list, add as many as needed
‘Userid’ => “1”,
‘IdInscripcionEstado’ => “1”,
‘IdCtrCdCurso’ => {IdCtrCdCurso}
‘FechaInscripcion’ => {datetime_field}
);
/ / Insert record
$ insert_sql = ‘INSERT INTO’. $ insert_table
. ‘(’. Implode (’,’, array_keys ($ insert_fields)). ‘)’
. ‘VALUES (’. Implode (’,’, array_values ($ insert_fields)). ‘)’;
sc_exec_sql ($ insert_sql);
}
When I click, it does absolutely nothing?, Any idea what happens?
Thank you in advance to all …