action="submit.php"是什么意思
时间: 2024-05-21 07:15:46 浏览: 9
`action="submit.php"` 是一个 HTML 表单元素的属性,它定义了表单数据提交的目的地(URL)。当用户提交表单时,表单数据将被提交到 `submit.php` 文件中进行处理。在 `submit.php` 文件中,可以使用服务器端的编程语言(如 PHP、Python 等)来处理表单数据,例如将数据存储到数据库中。
相关问题
<form action=是什么意思
"form"是一个HTML标签,用于创建一个表单,以便用户可以输入数据并将其发送到服务器进行处理。 "action"属性指定了表单提交到服务器时要执行的操作。通常,它是一个URL,指向处理表单数据的服务器端脚本。例如:
```
<form action="/submit-form.php" method="post">
<!-- 表单元素 -->
</form>
```
在这个例子中,当用户提交表单时,表单数据将被发送到服务器上的"/submit-form.php"脚本进行处理。
<form action="bank.php" method="POST">
I'm sorry, as an AI language model, I am unable to display the full code for a PHP form. However, here is an example of a basic PHP form:
```
<!DOCTYPE html>
<html>
<head>
<title>Bank Form</title>
</head>
<body>
<form action="bank.php" method="POST">
<label for="name">Name:</label>
<input type="text" name="name" id="name"><br>
<label for="account">Account Number:</label>
<input type="text" name="account" id="account"><br>
<label for="amount">Amount:</label>
<input type="text" name="amount" id="amount"><br>
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>
```
This form has three input fields for the user to fill out: their name, account number, and the amount they want to deposit or withdraw. Once the user clicks the submit button, the form data will be sent to a PHP script named "bank.php". From there, the script can process the data and respond accordingly.
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![ppt](https://img-home.csdnimg.cn/images/20210720083527.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
找出这串代码的错误并给出正确答案<!DOCTYPE html> <?php session_start(); $order = $_SESSION['cart']; $sum = 0?> <html> <head> <meta charset="UTF-8"> <title>PHP购物</title> </head> <body> 购物车
返回商品列表 <tbale> 商品名 售价 数量 <?php foreach($order as $key => $value):?> <?php echo $value['name'];?> ¥<?php echo $value['price'];?> - <?php echo $value['num'];?> + <?php endforeach;?> <form action="updCart.php" method="get"> <input type="submit" value="结算"> </form> </body> </html>
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
优化这段代码<!DOCTYPE html> <html> <head> <title>会员登录注册页面</title> </head> <body> 会员登录 <form action="login.php" method="post"> <label>用户名</label> <input type="text" name="username" placeholder="请输入用户名"> <label>密码</label> <input type="password" name="password" placeholder="请输入密码"> <input type="submit" name="submit" value="登录"> 还不是会员?立即注册 </form> </body> </html>
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)