0
我无法理解为什么这段代码不会保持转换。 应该改变什么?Php切换窗体:逻辑错误?
print_r($_POST);
$direction = isset($_POST['direction']) ? $_POST['direction'] : 'DESC';
$opposite = $direction == 'DESC' ? 'ASC' : 'DESC';
echo '
<form method="POST" >
<input type="submit" value="' . $opposite . ' " name="direction">
</form>
';
thx一堆戴夫,这是粗糙的! (用光的速度回答) – Webconstructor 2014-09-28 06:05:40