0) { $Page='0;url=brewer_info.php?k='.$Key.'&b='.$Val; } } else { if (cntEntry($Val) > 0) { $query='select brewer from entry where entry="'.$Val.'"'; $entry_res=mysqli_query($db, $query); $entry_row=mysqli_fetch_row($entry_res); $Page='0;url=entry_info.php?k='.$Key.'&e='.$Val.'&b='.$entry_row[0]; } } } elseif ($Action = 'b') { $ChkEmail=(strpos($Val, '@') !== FALSE); $query='select count(*) from names where '.($ChkEmail ? 'email' : 'fullname').' like "%'.$Val.'%"'; $cnt_res=mysqli_query($db, $query); $cnt_row=mysqli_fetch_row($cnt_res); if ($cnt_row[0] > 0) { if ($cnt_row[0] == 1) { $query='select brewer from names where '.($ChkEmail ? 'email' : 'fullname').' like "%'.$Val.'%"'; $name_res=mysqli_query($db, $query); $name_row=mysqli_fetch_row($name_res); $Page='0;url=brewer_info.php?k='.$Key.'&b='.$name_row[0]; } else { $Page='2;url=amenu.php?k='.$Key; $UseForm=TRUE; } } } if (empty($Page)) { $Page='0;url='; if ($Source == 'l') { $Page.=($Action == 'b' ? 'brewer' : 'entry').'_list'; } else { $Page.='amenu'; } $Page.='.php?k='.$Key; } } ?>

Brewer - Entry Select

'."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; } ?>