0

I have a form which sends a Roll_No value using post method to a php file:

//Query the database
$resultSet = $mysqli->query("SELECT * FROM late WHERE 'Roll_No' LIKE '" . $_POST['Roll_No'] . "';");

//Count the returned rows
if($resultSet->num_rows != 0){  

//Turn the results into an array and echo them
    while($rows = $resultSet->fetch_assoc())
    {
        $Roll_No = $rows['Roll_No'];
        $Time = $rows['Time'];

        echo "<p>Roll_No: $Roll_No <br />Time: $Time</p>";
    }

My code seems to be unable to take the Roll_No value from the form and therefore gives no results.

EDIT: Here's the form

<form action="report-d1.php" method="post" />
<p>Search by Roll_No<input type="text" name="Roll_No" /></p>
<input type="submit" value="Submit" />
</form>
Sluppo
  • 1
  • 1

0 Answers0