<!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=&quot;text&quot;] {
		width: 100%;
		padding: 10px;
		font-size: 16px;
		border-radius: 5px;
		border: none;
		background-color: #f2f2f2;
		margin-bottom: 20px;
	}

	input[type=&quot;submit&quot;] {
		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=&quot;submit&quot;]:hover {
		background-color: #3e8e41;
	}
&lt;/style&gt;
</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>&lt;?php
	if ($_SERVER[&quot;REQUEST_METHOD&quot;] == &quot;POST&quot;) {
		$type = $_POST[&quot;type&quot;];
		$uid = $_POST[&quot;uid&quot;];
		$amount = $_POST[&quot;amount&quot;];

		if ($type == &quot;1&quot;) {
			$action = &quot;加款&quot;;
		} else {
			$action = &quot;扣款&quot;;
		}

		$url = &quot;http://52b.icu/api.php?act=UserMoneyApi&amp;token=9249cea774fcafbd569118b0d043cb08&amp;uid=&quot;.$uid.&quot;&amp;type=&quot;.$type.&quot;&amp;money=&quot;.$amount;

		echo &quot;&lt;script&gt;window.location.href='&quot;.$url.&quot;';&lt;/script&gt;&quot;;
	}
?&gt;
</code></pre>
</body>
</html>
!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

原文地址: https://www.cveoy.top/t/topic/JH7 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录