2声明$ _POST无法正常工作[关闭]

I need to use 2 $_POST. Here's the code but it's not working.

if($_POST['grade'] == 'G1') && ($_POST['district'] == 'D1')

Thanks in advance!

Try by this

if($_POST['grade'] == 'G1' && $_POST['district'] == 'D1'){

    //Both Founded

}else{

    //Not Founded

}

In my opinion, you should also check that $_POST is not empty before trying to access any key inside

<?php
error_reporting(E_ALL);

if (!empty($_POST)) {

    if ($_POST['grade'] == 'G1' && $_POST['district'] == 'D1') {
        #condition fulfilled.
    } else {
        print_r($_POST); #debug $_POST and see where you went wrong
        exit;
    }
} else {
    die('POST GLOBAL IS EMPTY');
}