I have form that when submitted it uses AJAX and its posts data to reg1.php
. I want it to do some bits with the data posted and then redirect to a page to use it.
When I redirect after how do I post the posted data with it to list.php?
Or is there another way of doing it?
<script>
$(document).ready(function () {
$(".loginform").submit(function() {
data = $("#loginform").serialize();
$.ajax({
type: "POST",
url: "reg1.php",
data: data,
success: function(result) {
if (result == 'success') {
//$('.output_message').text('Message Sent!');
//$('#loader').hide();
alert("SUCCESS");
window.location.replace("list.php");
} else {
//$('.output_message').text('Error Sending email!');
alert("NO SUCCESS");
//$('#loader').hide();
}
}
});
return false;
});
});
</script>