!DOCTYPE htmlhtmlhead title加款扣款titleheadbody form method=post action= label for=type请选择加款或扣款:label select name=type id=type option value=1加款option option value=2扣款option select brbr label for
<!DOCTYPE html>
<html>
<head>
<title>加款扣款</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #eee;
}
<pre><code> form {
background-color: #fff;
padding: 20px;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
width: 50%;
margin: 0 auto;
text-align: center;
}
label {
display: block;
margin-bottom: 10px;
font-size: 16px;
font-weight: bold;
}
select,
input[type="text"] {
width: 100%;
padding: 10px;
font-size: 16px;
border-radius: 5px;
border: none;
background-color: #f2f2f2;
margin-bottom: 20px;
}
input[type="submit"] {
background-color: #4CAF50;
color: #fff;
padding: 10px 20px;
border-radius: 5px;
border: none;
cursor: pointer;
font-size: 16px;
transition: background-color 0.3s ease;
}
input[type="submit"]:hover {
background-color: #3e8e41;
}
</style>
</code></pre>
</head>
<body>
<form method="post" action="">
<label for="type">请选择加款或扣款:</label>
<select name="type" id="type">
<option value="1">加款</option>
<option value="2">扣款</option>
</select>
<br><br>
<label for="uid">请输入UID:</label>
<input type="text" name="uid" id="uid">
<br><br>
<label for="amount">请输入金额:</label>
<input type="text" name="amount" id="amount">
<br><br>
<input type="submit" value="提交">
</form>
<pre><code><?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$type = $_POST["type"];
$uid = $_POST["uid"];
$amount = $_POST["amount"];
if ($type == "1") {
$action = "加款";
} else {
$action = "扣款";
}
$url = "http://52b.icu/api.php?act=UserMoneyApi&token=9249cea774fcafbd569118b0d043cb08&uid=".$uid."&type=".$type."&money=".$amount;
echo "<script>window.location.href='".$url."';</script>";
}
?>
</code></pre>
</body>
</html>
原文地址: https://www.cveoy.top/t/topic/JH7 著作权归作者所有。请勿转载和采集!