javascript - Staying on same page after the form is submitted and then process the form again -


I am integrating MarketO (third party marketing software) with a tool on our website.

is a form that calls verb after calling and form data is saved in Marco:

    

I want to use the same form data to store it in the local database (MySQL) too. Even after sending the form data, I would like to load the same page and also store the data of this form locally.

There is no way to perform the following actions:

  1. Form action is called and data is sent to external database
  2. Load back Store the same page and this form locally in the database (be able to use $ _ POST )

    I use PHP and I am using plain javascript. Please advise.

    You can do this in your own scripts using an AJAX call, then submit the form. Can Market Marks

    Basically if you want to capture the data before sending it to a remote server for processing, you will first capture the data, then submit the form to the next processing and after that Allow to

    Here we capture the click of the form, then make sure to disable the button by adding a square to it. So that before the processing is done, users will not be allowed to click here. When this information is collected and sends to your PHP page, then it submits its code to the action property.

    In this example, I take the value from the input that the property named will be set to first name , this value will be sent to my PHP script and because I have a I have chosen a type of POST , I can see it in my form <

    Code> echo '& lt; Pre & gt; ', print_r ($ _ POST, true),' & lt; / pre & gt; ';

    This will give you an exhibit of the captured data.

      & lt; script type = "text / javascript" & gt; $ (Document) .ready (function () {$ ('formSubmitButton'). ('Click', function (e) {e.preventDefault (); if (! $ ('. FormSubmitButton'). HasClass ('( "Submit")) {// Disable form to stop merge clicks ('.psbsubmit button'). AddClass ('submit'); $ .ajax ('/ path / to / my / db / script ', {type: Val (), lastName: $ (' [name = "lastname"]). Val ()}}) (function (data) $ $ ('parent parent'). Submit (); // $ form ($ FormSubmitButton). RemoveClass ('Submit');})} Return false;})}}; & lt; / script & gt;   < / Div> 

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -