I have a form that has two inputs. After the user fills the form and clicks Submit, these inputs are compared with a MySQL table data.
What I want to do is: when the user clicks Submit in the form, it redirects the user to THE SAME PAGE, but with a Message.
If the user's input matches the data in the table, then the Message should be
"Your input matches the database"
If the user's input doesn't match, the message should be the opposite.
This is my code so far. Again, what I need to know is, how do I remain IN THE SAME PAGE, after the submit button is pressed.
$sql1 = " SELECT `Numero Cedula` FROM Teste WHERE `Numero Cedula`=$numero_cedula
and `Id`=$integer " ;
$objGet = mysqli_query($con, $sql1);
if( mysqli_num_rows($objGet) > 0 ) {
echo "Your input matches the database";
} else {
echo "Your input does not match the database";`
}