Html表单 [英] Html form

查看:76
本文介绍了Html表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过一个html表单如何将数据插入到不同的数据库表中。

Through one html form how to insert data into different database table.

推荐答案

首先:将表单方法设置为如下所示:
first: set the form method to post like below:
展开 | 选择 | Wrap | 行号


@Ciary


检查是否发布了某些内容的另一种方式:
@Ciary
another way to check if something was posted:
展开 | 选择 | Wrap | 行号


@Dormilich


其中有一个空腔。

如果在不使用提交按钮的情况下提交表单(例如按Enter键),则提交按钮将不会包含在请求中。 />

解决这个问题的方法是包含一个隐藏元素并使用它来检查。
@Dormilich
There is one cavity in that.
If the form is submitted without the use of the submit button (by pressing Enter, for example), the submit button will not be included in the request.

A way around this is to include a hidden element and use that to check.
Ex pand | 选择 | Wrap | 行号


这篇关于Html表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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