Good afternoon. The question is the following. How to send POST to php script from the main page and immediately redirect the user to the result page with the results. The problem is that the result page is completely on ajax working. I do not want to make another handler in php.

Can it be possible to transfer a variable from one page to the ajax script of another page?

  • Thu somehow everything is confused, I think the cookie will not spoil your code :) - zb '
  • better to put everything in the session. - dlarchikov
  • @dimka, how will the data from the session be in the ajax request? you can cookie, you can encoded $ _POST in a div or a script to put. - zb '

1 answer 1

Solved the problem in another way. I pass a link like ссылка&опция=значение from the header and redirect it to it, and on the summary page in the onload check if there is a GET['опция'] , then execute an ajax request and voila, when I go to the page, everything works as I needed)