I am building an online system which a student can request for his or her transcript, I have been able to get hold of the information which will be passed to the database to fetch the result of that particular person using the superglobal $_REQUEST , my form action is Post and the student is to provide his Registration number eg: 300621713096, his first and last name eg Anthony Joshua and the Semesters he is requesting transcript eg: level 100 semester 1 . this is my code when I run it tells me data query failed , I want to know is
<?php
session_start();
require_once  'dbconnect.php';
$Reg_number = $_REQUEST['Reg_number'];
$first_name = $_REQUEST['first_name'];
$last_name = $_REQUEST['last_name'];
$requestsem = $_REQUEST['requestsem'];
$Currentsem = $_REQUEST['Currentsem'];
   
  
?>
 <!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<html>
<head>
    <title>Transcript Portal</title>
    <link href="css/all.css" rel="stylesheet">
       <link rel="stylesheet" href="css/bootstrap.css">
       <link rel="stylesheet" href="css/bootstrap.min.css">
       
       <link type="text/css" href="css/style.css" rel="stylesheet" >
    
</head>
<body>
<table class="table table-bordered">
  <thead>
  <?Php
   if($Reg_number===$_REQUEST['Reg_number'] ){
    $sql="SELECT subject_code, subject_title, credit_point, ia, ea, total, grade, grade_point WHERE reg_num = '$Reg_number'";
   $result = mysqli_query( $connect , $sql);
   if(!$result){
     die("Data query failed");
   }
  }
   ?>
    <tr>
    <?Php
     echo 'Registration Number::', $Reg_number;
     echo 'Student Name::', $first_name  .  $last_name;
     echo 'PROGRAMME::', $Currentsem;
     echo 'SEMESTER::', $requestsem;
    ?>
    
      <th scope="col">SUBJECT</th>
      <th scope="col">SUBJECT TITLE </th>
      <th scope="col">CREDIT POINT</th>
      <th scope="col">IA</th>
      <th scope="col">EA</th>
      <th scope="col">TOTAL</th>
      <th scope="col">GRADE</th>
      <th scope="col">GRADE POINT</th>
    </tr>
   
   
  </thead>
  <tbody>
   <?php
       while(  $row=mysqli_fetch_assoc($result))
       {
       
   ?>
    <tr>
      <td><?php echo $row ['subject_code'];?></td>
      <td><?php echo $row ['subject_title'];?></td>
      <td><?php echo $row ['credit_point'];?></td>
      <td><?php echo $row ['ia'];?></td>
      <td><?php echo $row ['ea'];?></td>
      <td><?php echo $row ['total'];?></td>
      <td><?php echo $row ['grade_point'];?></td>
      
    </tr>
    <?php
    }
    ?>
    <tr>
      <td>kwame</td>
      <td>Jacob</td>
      <td>Thornton</td>
      <td>@fat</td>
      <td>@fat</td>
      <td>@fat</td>
      <td>@fat</td>
      <td>@fat</td>
    </tr>
    <tr>
      <td>kk</td>
      <td>Larry the Bird</td>
      <td>Larry the Bird</td>
      <td>Larry the Bird</td>
      <td>@twitter</td>
      <td>@twitter</td>
      <td>@twitter</td>
      <td>@twitter</td>
    </tr>
    <tr>
      <td>kk</td>
      <td>Larry the Bird</td>
      <td>Larry the Bird</td>
      <td>Larry the Bird</td>
      <td>@twitter</td>
      <td>@twitter</td>
      <td>@twitter</td>
      <td>@twitter</td>
    </tr>
    <tr>
      <td>kk</td>
      <td>Larry the Bird</td>
      <td>Larry the Bird</td>
      <td>Larry the Bird</td>
      <td>@twitter</td>
      <td>@twitter</td>
      <td>@twitter</td>
      <td>@twitter</td>
    </tr>
    <tr>
      <td>kk</td>
      <td>Larry the Bird</td>
      <td>Larry the Bird</td>
      <td>Larry the Bird</td>
      <td>@twitter</td>
      <td>@twitter</td>
      <td>@twitter</td>
      <td>@twitter</td>
    </tr>
  </tbody>
</table>
  <!-- jQuery library -->
  <script src="js/jquery-3.4.1.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="js/bootstrap.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html><?php
//
session_start();
require_once 'dbconnect.php';
?>
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<html>
<head>
    <title>Transcript Portal</title>
    <link href="css/all.css" rel="stylesheet">
       <link rel="stylesheet" href="css/bootstrap.css">
       <link rel="stylesheet" href="css/bootstrap.min.css">
       
       <link type="text/css" href="css/style.css" rel="stylesheet" >
    
</head>
<body>
<h1>Trust College</h1>
<h3>Provisional Transcript Portal</h3>
    <div class="wrapper">
     
        <form action="create.php" method="POST">
            <div class="form-group ">
                <label>Registration Number:</label>
                <input type="text" name="Reg_number" id="regnum" class="form-control" value="">
                <span class="help-block"></span>
            </div> 
             
            <div class="form-group">
                <label>First Name:</label>
                <input type="text" name="first_name" id="studentname" class="form-control" value="">
                <span class="help-block"></span>
                 
                
                <label>Last Name:</label>
                <input type="text" name="last_name" id="studentname" class="form-control" value="">
                <span class="help-block"></span> 
            </div>
            <div class="form-group">
                <label>Current Semester:</label>
                <select class="form-control" name="Currentsem">
                
             <option value="0" class="form-control">None</option>
             <option value="1"class="form-control">Level 100 Semester 1</option>
             <option value="2"class="form-control">Semester 2</option>
             <option value="3"class="form-control">Semester 3</option>
             <option value="4"class="form-control">Semester 4</option>
             <option value="5"class="form-control">Semester 5</option>
             <option value="6"class="form-control">Semester 6</option>
             <option value="7"class="form-control">Semester 7</option>
             <option value="8"class="form-control">Semester 8</option>
</select>
                
                <span class="help-block"></span>
            </div>
            <div class="form-group">
                <label>Requesting Semester:</label>
                <select class="form-control" name="requestsem">
                
             <option value="0" class="form-control">None</option>
             <option value="1"class="form-control">Semester 1</option>
             <option value="2"class="form-control">Semester 2</option>
             <option value="3"class="form-control">Semester 3</option>
             <option value="4"class="form-control">Semester 4</option>
             <option value="5"class="form-control">Semester 5</option>
             <option value="6"class="form-control">Semester 6</option>
             <option value="7"class="form-control">Semester 7</option>
             <option value="8"class="form-control">Semester 8</option>
</select>
                
                <span class="help-block"></span>
            </div>
            <div class="form-group">
                <input type="submit" class="btn btn-primary" name="submit" value="Submit">
            </div>
        </form>
    </div>    
   <!-- jQuery library -->
   <script src="js/jquery-3.4.1.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="js/bootstrap.js"></script>
<script src="js/bootstrap.min.js"></script>
 
<body>
</html> 
     
    