对用户通知技术感到好奇。提到简单的东西。例如,用户提交了一个联系表单。一旦提交,用户就会看到提交表单提交成功的消息。用户通知
这是问题。你怎么做到这一点(与PHP),而不附加一个字符串的网址?我问这是因为我看到越来越多的网站通知用户,而不使用url中的GET查询var。
他们只是将某些东西存储在某个地方的全局变量中,并在读取时读取/取消设置?目前使用什么技术来实现这一点?
为了进一步增加,当表单被提交并保存:
//The form has been processed, emailed, etc. Now redirect the user back to the page
//We redirect the user so that if they click refresh, the form doesn't re-submit.
//So without a query var in the url, who does the page no that a form was saved?
//Sessions are one solution, what if sessions are not being used?
header("Location:the_original_page.php");
请参阅我的回答中添加的备注关于使用数据库而不是会话来确定发布成功 – 2011-06-04 20:22:47