无法获得$ _post [“SearchSubmit”]值

<form class="form-inline" id="form1" method="post" role="form" action="">
    <div class="from-group">
        <label for="usr">Search Here</label>
        <input id="search" name="search" class="form-control" placeholder="Enter the First Name">
        <input type="submit" class="btn btn-success" name="SearchSubmit" value="GO" />
    </div>
    <div>
        <a class="btn btn-primary" href="logout.php">LOGOUT</a>
    </div>
</form>
<?php var_dump($_POST['SearchSubmit']); ?>
    <table class="table text-info">
        <tr>
            <th class="text-center">First Name</th>
            <th class="text-center">Last Name</th>
            <th class="text-center">Date of Birth</th>
            <th class="text-center">Address</th>
            <th class="text-center">Last Passout Standard</th>
            <th class="text-center">Last Passout Percentage</th>
            <th class="text-center">Last Passout Year</th>
        </tr>
        <tbody id="log"></tbody>
    </table>
    <script type="text/javascript" language="javascript">
        <?php if($_POST['SearchSubmit']){ ?>
           $('document').ready(function() {
               $('#log').load('searchresult.php');
           });
          //$('#log').load('searchresult.php');
          <?php } ?>
           $('document').ready(function() {
                 $('#log').load('studentList.php');
              });
          //$('#log').load('studentList.php');
    </script>

The above mentioned is my code but i can not load any of them log file in my current php page. I have also print the $_POST['SearchSubmit'] what i get is null value. I just want to get if search box is filled so searchresult will be load otherwise studentList will be load. please help to solve this issue.

Everything is fine.But you did not assigned action to form.Set same page name as action.Suppose your page name is myform.php. then action="myform.php".

if you use php stick with it

<?php if(isset($_POST['SearchSubmit'])){
 include 'searchresult.php';
} else {
 include 'studentList.php';
}?>