我的数据库tbl1,tbl2和tbl3中有3个表。
我的HTML表单
<form action="" method="post">
<input type="text" class="form-control" id="department" name="department" placeholder="Enter Name" required>
<input type="text" class="form-control" id="cost" name="cost" placeholder="Enter Name" required>
<select class="custom-select" name="roles" id="inputGroupSelect01 status">
<option selected>Choose...</option>
<option value="Available">Available</option>
<option value="Repair">Repair</option>
<option value="Checked Out">Checked Out</option>
</select>
添加用户
我的问题是,如果用户选择“可用”,则整个表单数据应转到tbl1,如果该值已被处理,则应转到tbl2,如果已将其签出,则应转到tbl3。
我该怎么办?
首先,您需要具有一个提交按钮才能将数据发送到服务器端