开发者

data retrieval problem using PHP and Jquery

I have used jquery to post the data to a php validation page i have also got the result but when i get sucess i want to redirect to some other page(say success page) and on that page i want to display email-id. i have tried posting the data by using $.post('../success.php','$('#form')',function(data){ alert(data);

}) ;

to other page but when i write alert(data) i get the email-id in the alert box but it does not get displaye开发者_JAVA百科d on the page.

success.php echo $_POST['email'];

Please Reply as soon as possible.


You could submit a hidden form when the first ajax call returns success.

<form action="success.php" name="emailCallback" method="post">
   <input type="hidden" name="email" />
</form>

.success(function() { 
   $('form[name=emailCallback]').submit();
})
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜