The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database search filter
#41
Hi Sorry have not been active, my project got scraped Sad

LBC, I think you may need to remove the initial code blocks and just have:

Code:
if($project == 1){
Code:
$project = '1';
Code:
}

Code:
if($volunteer == 1){
Code:
$volunteer = '1';
Code:
}

Then when it comes to returning the results you would have something like:

Code:
if(!empty($_POST)){
Code:
echo "<strong>Here's what we found under Volunteers...</strong><br>";
Code:
if(!empty($matches) && $volunteer == 1){
Code:
foreach ($matches as $m){
Code:
$foundQ = $db->query("SELECT * FROM users WHERE volunteer = 1 AND id = ?",($m));
Code:
$found = $foundQ->first();
Code:
echo '<a href="users/profile.php?id='.$found->id.'"'.'>'.$found->fname.' '.$found->lname.'</a><br>';
Code:
}
Code:
}else{
Code:
echo "Sorry. No users were found";
Code:
}
Code:
}
Code:
?>

Hopefully the syntax is correct and this returns the results you are after. If this works you can insert an elif for projects.
  Reply


Messages In This Thread
Database search filter - by LBC - 01-12-2017, 11:06 AM
Database search filter - by mudmin - 01-12-2017, 01:57 PM
Database search filter - by Brandin - 01-12-2017, 02:44 PM
Database search filter - by LBC - 01-12-2017, 04:19 PM
Database search filter - by mudmin - 01-12-2017, 08:27 PM
Database search filter - by LBC - 01-13-2017, 06:33 AM
Database search filter - by mudmin - 01-13-2017, 02:17 PM
Database search filter - by mudmin - 01-13-2017, 06:43 PM
Database search filter - by meetmec12 - 01-14-2017, 09:42 AM
Database search filter - by LBC - 01-17-2017, 08:11 AM
Database search filter - by mudmin - 01-17-2017, 02:21 PM
Database search filter - by LBC - 01-18-2017, 08:35 AM
Database search filter - by LBC - 01-18-2017, 08:56 AM
Database search filter - by sabr - 01-18-2017, 12:24 PM
Database search filter - by LBC - 01-18-2017, 12:55 PM
Database search filter - by LBC - 01-18-2017, 02:36 PM
Database search filter - by sabr - 01-18-2017, 02:57 PM
Database search filter - by LBC - 01-19-2017, 07:35 AM
Database search filter - by sabr - 01-19-2017, 07:42 AM
Database search filter - by LBC - 01-19-2017, 08:28 AM
Database search filter - by sabr - 01-19-2017, 08:46 AM
Database search filter - by LBC - 01-19-2017, 08:54 AM
Database search filter - by sabr - 01-19-2017, 08:57 AM
Database search filter - by LBC - 01-19-2017, 08:58 AM
Database search filter - by sabr - 01-19-2017, 12:07 PM
Database search filter - by LBC - 01-20-2017, 06:43 AM
Database search filter - by sabr - 01-20-2017, 08:19 AM
Database search filter - by LBC - 01-20-2017, 08:56 AM
Database search filter - by sabr - 01-20-2017, 09:00 AM
Database search filter - by mudmin - 01-20-2017, 03:25 PM
Database search filter - by plb - 01-22-2017, 09:18 PM
Database search filter - by LBC - 01-24-2017, 08:15 AM
Database search filter - by LBC - 01-24-2017, 09:00 AM
Database search filter - by plb - 01-24-2017, 08:43 PM
Database search filter - by LBC - 01-25-2017, 07:06 AM
Database search filter - by LBC - 01-30-2017, 07:16 AM
Database search filter - by mudmin - 02-03-2017, 02:17 PM
Database search filter - by LBC - 02-06-2017, 07:30 AM
Database search filter - by mudmin - 02-07-2017, 03:27 AM
Database search filter - by LBC - 02-07-2017, 06:56 AM
Database search filter - by sabr - 02-07-2017, 08:26 AM
Database search filter - by LBC - 02-07-2017, 09:23 AM
Database search filter - by sabr - 02-07-2017, 09:34 AM
Database search filter - by LBC - 02-07-2017, 09:47 AM
Database search filter - by sabr - 02-07-2017, 07:26 PM
Database search filter - by LBC - 02-08-2017, 08:12 AM
Database search filter - by sabr - 02-08-2017, 11:54 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)