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
multiple select box or checkboxes in the registration form
#21
Ok...so if you need to search the entire database at once and you need to be able to search for things that were put in via checkboxes, then I think the best thing is to change those checkboxes from 0 and 1 to unique names for on and off.

Then you're going to want something like this...it's not exact, but it will point you in the right direction.

Code:
if(isset($_POST['search'])){

Code:
$query = Input::get('input');
Code:
$query = htmlspecialchars($query);
Code:
$searchQ = $db->query("SELECT * FROM users WHERE over_18 LIKE '{3bc1fe685386cc4c3ab89a3f76566d8931e181ad17f08aed9ad73b30bf28114d}$query{3bc1fe685386cc4c3ab89a3f76566d8931e181ad17f08aed9ad73b30bf28114d}' OR love_us LIKE '{3bc1fe685386cc4c3ab89a3f76566d8931e181ad17f08aed9ad73b30bf28114d}$query{3bc1fe685386cc4c3ab89a3f76566d8931e181ad17f08aed9ad73b30bf28114d}'
Code:
OR am_human LIKE '{3bc1fe685386cc4c3ab89a3f76566d8931e181ad17f08aed9ad73b30bf28114d}$query{3bc1fe685386cc4c3ab89a3f76566d8931e181ad17f08aed9ad73b30bf28114d}'");
Code:
$results = $searchQ->results();
Code:
$count = $searchQ->count();
Code:
}

That's the search...then you have to generate your table of results...
Code:
if(isset($count) && $count>0){
Code:
foreach ($results as $result) {

//table of results goes here
  Reply


Messages In This Thread
multiple select box or checkboxes in the registration form - by mudmin - 11-17-2016, 09:27 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)