douxian1895
2013-05-17 16:53
浏览 74

通过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?

图片转代码服务由CSDN问答提供 功能建议

我的主要目的是在询问安全问题后恢复忘记的密码。

完成:我正在检查数据库中的电子邮件ID(来自忘记密码屏幕的电子邮件ID,通过ajax post方法),如果电子邮件ID存在,我将收到问题和答案 匹配会话变量中的记录。 在成功调用ajax后,我将重定向到安全问题页面。

问题:我想在该问题文本框中显示该会话中的问题(forgot_password.php)以询问他们 输入答案。

有什么建议吗?

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dpw50696 2013-05-17 17:15
    已采纳

    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.

    打赏 评论

相关推荐 更多相似问题