Home:ALL Converter>posting form and retieving posted data in another page using jquery

posting form and retieving posted data in another page using jquery

Ask Time:2010-09-23T14:22:50         Author:Prady

Json Formatter

I am trying to post a form to another php page. The posted data is processed in the php page and page needs to be redirected to a new url.

1) Where do i give this code for posting the data to test.php. Do i have to call this in a function when the submit button is clicked?

 $.post("test.php", { name: "John", time: "2pm" } );

2) How do i retrieve the posted data in the test.php?

Thanks Prady

Author:Prady,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/3775876/posting-form-and-retieving-posted-data-in-another-page-using-jquery
yy