使用php制作类似下图所示界面,投诉详情可以自定义,要求点击提交按钮后,输出选中和输入的投诉信息。 投诉类型分为态度不好、业务不熟和没人接电话,可以多选,有提交和重置按键
时间: 2024-03-08 22:51:18 浏览: 18
由于我是一个语言模型 AI,并没有界面交互的能力。不过,我可以提供一个 PHP 代码示例,可以帮助你完成这个界面的制作,如下所示:
```php
<!DOCTYPE html>
<html>
<head>
<title>投诉界面</title>
</head>
<body>
<h1>投诉界面</h1>
<form method="post">
<label for="name">姓名:</label>
<input type="text" id="name" name="name"><br><br>
<label for="phone">电话:</label>
<input type="text" id="phone" name="phone"><br><br>
<label for="complaint">投诉详情:</label>
<textarea id="complaint" name="complaint"></textarea><br><br>
<label for="type">投诉类型:</label><br>
<input type="checkbox" id="attitude" name="type[]" value="态度不好">
<label for="attitude">态度不好</label><br>
<input type="checkbox" id="unfamiliar" name="type[]" value="业务不熟">
<label for="unfamiliar">业务不熟</label><br>
<input type="checkbox" id="noanswer" name="type[]" value="没人接电话">
<label for="noanswer">没人接电话</label><br><br>
<input type="submit" name="submit" value="提交">
<input type="reset" name="reset" value="重置">
</form>
<?php
if(isset($_POST['submit'])){
$name = $_POST['name'];
$phone = $_POST['phone'];
$complaint = $_POST['complaint'];
$type = implode(',', $_POST['type']);
echo "<h2>投诉信息</h2>";
echo "姓名:$name<br>";
echo "电话:$phone<br>";
echo "投诉详情:$complaint<br>";
echo "投诉类型:$type<br>";
}
?>
</body>
</html>
```
这是一个简单的 HTML 表单,包含姓名、电话、投诉详情和投诉类型等信息,以及提交和重置按钮。当用户点击提交按钮后,通过 PHP 代码获取表单中的值,并输出选中和输入的投诉信息。注意,投诉类型是多选的,需要使用数组来保存选中的值,并使用 implode 函数将其转换为字符串。