can u tell me whats wrong? i want to ouput "yes" if match is found and "No Result" result if there is no result.. it seems that it dont ouput anything..
<?php
$output = NULL;
if(isset($_POST['submit'])){
$st = $_POST['search'];
//Connect to the Database
$mysqli =NEW mysqli("localhost","root","","exam");
$search = $mysqli->real_escape_string($st);
echo $st;
//Query Database
$result = $mysqli->query("SELECT * FROM users WHERE name = '$search'");
if($result->num_rows > 0){
echo "yes";
}
else{
echo "No RESULT";
}
}
?>
<form>
<input type="TEXT" name="search"/><br>
<input type="SUBMIT" name="submit" value="search"/>
</form>