-
Notifications
You must be signed in to change notification settings - Fork 0
/
searchhere.php
25 lines (16 loc) · 726 Bytes
/
searchhere.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
include("inc/func.php");
db_open();
if(isset($_POST['newval'])){$search = mysql_prep($_POST['newval']);}else{die('---');}
echo 'You Searched for: "'.$search.'"';
$fs = qu("SELECT 'donors' AS db,d.id , CONCAT(d.NAME,' ', d.lname) AS vname, l.betitle as `stitle`, page FROM donors d
JOIN donor_loc l ON l.id = d.loc
WHERE d.NAME LIKE '%{$search}%' OR d.lname LIKE '%{$search}%' OR CONCAT(d.NAME,' ', d.lname) LIKE '%{$search}%'
order by stitle, vname
");
if(rowc($fs) == 0){echo '<p>No Results Found.</p>';}else{
while($n = fa($fs)){
echo '<p style="font-size:32px;"><strong>'.$n['vname'].' </strong> ('.$n['stitle'].') <a href="board_profile.php?p='.$n['id'].'" class="btnred">View</a></p>';
}
}
?>