<html>
<title></title>
<head>
</head>
<body>
<fieldset>
<form action="" method="POST">
<center><h3> Check Result</h3></center>
<center>
Search<br>
<input type="text" name="rolld" >
<br><br>
<input type="text" name="dob">
<br><br>
<input type="submit" name="submit">
</center>
</form>
</fieldset>
</body>
</html>
<center>
<?php
error_reporting(0);
$conn = mysqli_connect("localhost", "root", "","schoolreult");
//search code
//error_reporting(0);
if($_REQUEST['submit']){
$name = $_POST['name'];
$result=$_POST['result'];
$rolld=$_POST['rolld'];
$fathername=$_POST['fathername'];
$dob=$_POST['dob'];
$marks=$_POST['marks'];
$subject1=$_POST['subjct1'];
if(empty(rolld)){
$make = '<h4>You must type a word to search!</h4>';
}else{
$make = '<h4>No match found!</h4>';
$sele = "SELECT * FROM result WHERE rolld LIKE '%$rolld%' AND dob='$dob'";
$result = mysqli_query($conn,$sele);
if($mak = mysqli_num_rows($result) > 0){
while($row = mysqli_fetch_assoc($result)){
echo '<h4> Id : '.$row['id'];
echo '<br> rolld : '.$row['rolld'];
echo '<br> name : '.$row['name'];
echo '<br> Fathername : '.$row['fathername'];
echo '<br> dob : '.$row['dob'];
echo '<br> marks : '.$row['marks'];
echo '<br> result : '.$row['result'];
echo '<br> subject1 : '.$row['subject1'];
echo '</h4>';
}
}else{
echo'<h2> Search Result</h2>';
print ($make);
}
mysqli_free_result($result);
}
}
?>
</center>
Next
« Prev Post
« Prev Post
Previous
Next Post »
Next Post »
Subscribe to:
Post Comments (Atom)
ConversionConversion EmoticonEmoticon