How to pass editor values to a PHP script on PostCreate?
How to pass editor values to a PHP script on PostCreate?
I've attempted this, but the examples on this page only show how to create a PDO database entry:
https://editor.datatables.net/manual/php/events
I just want to pass the editor results to PHP so that I can have a PHP script send an Email with the values after a new row has been created.
Are there any examples of this? Or should I be using the client side PostCreate function? If so, I can't see a way of passing the variables out..
With my (bad) attempts at this, I seem to get closer before receiving the errors:
Notice: Array to string conversion
or if writing to a file to test:
"error":"You cannot serialize or unserialize PDO instances"
Any help or a nudge in the right direction would be much appreciated. Many thanks.
This question has accepted answers - jump to:
Answers
Okay, I figured it out.
Everything can be wrapped in a preCreate function:
using
Thanks for posting back - good to hear you've got a solution!
Allan