通过ajax调用从php到另一个php的会话值

My main purpose is to recover forgot password after asking security question.

DONE: I am checking for the email id(email id from the forgot password screen via ajax post method) in the database, If the email id exist I am getting the question and answer for that matched record in the session variable. After the success ajax call, I am redirecting to the security question page.

QUESTION: I want to display the question from that session(forgot_password.php) in that question text box to ask them to type for the answer.

Any suggestions?

you can add question to the session array and access that from any session enabled page. You just need to make sure on security page you have this -

  <?php session_start(); ?>

at the top of everything. That's all. Access the session value and print it.