Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I been working in a quiz, it stores the data of the users who register and has a section that displays the scores obtained grabbing them from my database in mysql, here is the structure:

echo  '<div class="panel"><table class="table table-striped title1">
<tr><td><b>S.N.</b></td><td><b>User</b></td><td><b>Lastname</b></td><td><b>Name</b></td><td><b>Carrer</b></td><td><b>Correct Answers</b></td><td><b>Incorrect answers</b></td><td><b>Persentage</td>';
$c=1;
while($row = mysqli_fetch_array($result)) {
    $qid = $row['qid'];
  $ansid = $row['ansid'];
  $incorrectos = 60-$ansid;
  $porcentaje = round(($ansid/60)*100,2);
  $lastname = $row['lastname'];
  $name = $row['name'];
  $career = $row['career'];
 $email = $row['email'];
$rowcount=mysqli_num_rows($result); 
if($rowcount == 0 && $email != $qid){
  echo '<tr><td>'.$c++.'</td><td><p id="qid">'.$qid.'</p></td><td>No info to display</td><td>No info to display</td><td>'.$ansid.'</td><td>'.$incorrect.'</td><td>'.$percentage.'</td></tr>';
}
else
{
echo '<tr style="color:#99cc32"><td>'.$c++.'</span></td><td><p name="qid">'.$qid.'</p></td><td>'.$lastname.'</td><td>'.$name.'</td><td>'.$career.'</td><td>'.$ansid.'</td><td>'.$incorrect.'</td><td>'.$percentage.'</td></tr>';
}
}
$c=0;
echo '</table></div>';
}

Im looking how to implement a search bar that looks for the given word and display the matching records, is there any example to implement this tool?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
201 views
Welcome To Ask or Share your Answers For Others

1 Answer

等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...