Some code examples for testing the POST and webhook options in Jotform.
(Done on Windows in this case)
-
Open XAMPP and start Apache & MySQL
-
Open the Admin page for MySQL and set up a database to use
-
In my case I added all columns as VARCHAR to keep it simple
-
Download PHP files from this repository
-
Place files in the
htdocs
folder- Default location is
C:\xampp\htdocs
- Default location is
-
Start ngrok with
http {port}
- In my case
.\ngrok.exe http 80
- In my case
-
Save the generated ngrok link
- Usually looks something like
https://{random characters}.ngrok-free.app
- Usually looks something like
-
Test that link works by adding one of the filenames at the end and open it in a browser
- Example: https://{random characters}.ngrok-free.app/print_and_save_sql.php
- It should show an error about submission data if the link works
Set Thank You page to redirect to your webhook_to_text.php file with POST data.
https://{random characters}.ngrok-free.app/print_and_save_sql.php
In form integrations, add webhook and link to your webhook_to_text.php file.
https://{random characters}.ngrok-free.app/webhook_to_text.php
In form integrations, add webhook and link to your webhook_to_sql.php file.
https://{random characters}.ngrok-free.app/webhook_to_sql.php