将表单条目提交到数据库并重定向到同一页面 [英] submit form entries to the database and redirect to the same page

查看:75
本文介绍了将表单条目提交到数据库并重定向到同一页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将表单条目提交到数据库并重定向到同一页面,条目仍显示在表单的字段中?我真的需要帮助。谢谢。

How do I submit form entries to the database and redirect to the same page, with the entries still display on the fields of the form? I really need help on this. Thanks.

推荐答案


如何将表单条目提交到数据库并重定向到同一页面,条目仍然显示在表单的字段上?我真的需要帮助。谢谢。
How do I submit form entries to the database and redirect to the same page, with the entries still display on the fields of the form? I really need help on this. Thanks.



这是一个非常大的话题,有无穷无尽的可能性,但这里有一个小片段。


这里是基本的想法。


1.使用

This is a really big topic and there are endless possibilities, but here is a little snippet for you.

Here is the basic idea.

1. use


_SERVER [''PHP_SELF'']作为你脚本的动作,这样你才能回来提交表单时到同一页面。

2.如果
_SERVER[''PHP_SELF''] as the action of your script so that you come back to the same page when you submit the form.
2. if


_POST变量已设置,则处理它们将它们放入数据库。然后分配
_POST variables are set then process them put them in your database. then assign the


这篇关于将表单条目提交到数据库并重定向到同一页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆