>>>>>>>>>>>>>>>>>>>>>>>>>> User search <<<<<<<<<<<<<<<<<<<<<<<<<<<<* **********************************************************************/ if (!empty($_GET['search'])) { $_GET['username'] = $_GET['search']; } define('USERS_PER_PAGE', 30); if(isset($_GET['username'])){ $_GET['username'] = trim($_GET['username']); // form submitted $Val->SetFields('username','1','username','Please enter a username.'); $Err = $Val->ValidateForm($_GET); if(!$Err){ // Passed validation. Let's rock. list($Page,$Limit) = page_limit(USERS_PER_PAGE); $DB->query("SELECT SQL_CALC_FOUND_ROWS ID, Username, Enabled, PermissionID, Donor, Warned FROM users_main AS um JOIN users_info AS ui ON ui.UserID=um.ID WHERE Username LIKE '%".db_string($_GET['username'])."%' ORDER BY Username LIMIT $Limit"); $Results = $DB->to_array(); $DB->query('SELECT FOUND_ROWS();'); list($NumResults) = $DB->next_record(); } } show_header('User search'); ?>

Search results

Username:  

Username Class