Inserting collected data into a third party database... Where do I code the PHP script?

  • lrodz1966
    Asked on March 17, 2021 at 9:34 PM

    Hello everyone,

    Here’s my conundrum… I’m attempting to collect customer input data via JotForm (card format) embedded in a Wix site. I’m enrolling and authenticating users through Wix. Upon the form being submitted, I want to populate a MySQL database hosted by FastComet, and then return control to the Wix form without losing track of the user’s credentials.

    I’m aware of Webhooks, but I need to ensure that the data transferred to the external database is secured. Unfortunately, Wix and JotForm don’t seem to like playing nice in the sandbox. Otherwise, I would connect directly to JotForm tables and access the submissions through an API instead of routing the data to a third party.

    The only option that seems feasible is posting the data to MySQL using the Thank You page. I’ve looked at all of your examples listed in this forum. Still, I can’t figure out where to load the PHP script (root folder?) to connect to the database and insert the information being submitted.

    I’m sure I’m missing something. Could someone please shed some light on this?

    Most appreciated.

  • grace JotForm Developer
    Replied on March 18, 2021 at 4:22 AM

    Hi lrodz1966,

    I've cloned and checked your form, I've noticed that your Thank you page does not redirect to your URL to post your data via this link. Here are images;

    1616055492 60530cc450269 Screen Shot 202 Screenshot 10

    1616055510 60530cd62814d Screen Shot 202 Screenshot 21

    There is a detailed guide about sending post via Thank you page: https://www.jotform.com/help/213-send-submission-data-via-post-method-and-thank-you-settings

    Also, editing Thank you page in card layout forms: https://www.jotform.com/help/499-how-to-edit-thank-you-page-settings

    If you need further assistance, please let us know.