Calling a php script to populate a DataTables column after upload?

Calling a php script to populate a DataTables column after upload?

scc_gsiscc_gsi Posts: 4Questions: 2Answers: 0

I have written a php script to generate an url and id for a row in the database.
How can I use ajax to call this script after an user uploads data in order to populate the two columns in the database?
Thank you.

Answers

  • allanallan Posts: 63,457Questions: 1Answers: 10,466 Site admin

    Rather than having the client-side call a server-side script on behalf of the server-side for upload, can you not just call it directly from the server-side?

    The preUpload and postUpload events on the server-side should be useful for that.

    Allan

  • scc_gsiscc_gsi Posts: 4Questions: 2Answers: 0

    Thanks Allan. Would using include or require be the be best method for calling a script postCreate?

    for ex:

        ->on( 'postCreate', function ( $editor, $id, $values, $row ) {
           require('helpers.php');
        } )
        
    
This discussion has been closed.