フォームに2つの変数が設定されている場合、特定のデータを表示しようとしています。複数のIsset変数を取得できません
$retired = "";
$stolen = "";
if(isset($_POST['submit'])){
$retired = $_GET['showretired'];
$stolen = $_GET['showstolen'];
}
私は怒鳴るを試してみました:
<?php }elseif(isset($_GET['showretired'], $_GET['showstolen'])) {
を設定していないときに動作し
<?php }elseif(isset($retired, $stolen)){
動作しない
<?php }elseif(isset($_GET['showretired']) && (isset($_GET['showstolen'])){ ?>
これは、退職した部分のみを示しています。
これを行う最善の方法がわかりません。ここで
は形式です:
<form>
<label>Show Retired Column </label><input type="checkbox" name="showretired">
<label class="space">Show Stolen Column </label><input type="checkbox" name="showstolen">
<input class="space" type="submit" name="submit" value="Refine">
</form>
これは私が同じファイルで変数を使用しています方法です。
<?php }elseif(isset($_GET['showretired'], $_GET['showstolen'])) {
?>
<tr>
<th>Retired</th>
<th>Stolen</th>
</tr>
<?php }else{ ?>
を助けることを願っていますか? –
私はそれを逃していました –