$tag_val) { if (in_array($tag, $NotEmpty) && empty($tag_val)) { $e_tag=$tag.'_R'; $e_brewer[$e_tag]=TRUE; } if ($brewer['BREWER_TYPE'] != 'G' && in_array($tag, $NotEmptyI) && empty($tag_val)) { $e_tag=$tag.'_R'; $e_brewer[$e_tag]=TRUE; } if ($brewer['BREWER_TYPE'] == 'G' && in_array($tag, $NotEmptyG) && empty($tag_val)) { $e_tag=$tag.'_R'; $e_brewer[$e_tag]=TRUE; } $Res=0; if (in_array($tag, $Phones) && !empty($tag_val)) { list($Res, $brewer[$tag])=test_phone($tag_val); } if ($tag == 'ZIP' && !empty($tag_val)) { list($Res, $brewer[$tag])=test_zip($tag_val, $brewer['STATE']); } if (get_ctrl('NB-ASK') == 'Y' && $tag == 'NEW_BREWER' && !in_array($tag_val, array('N', 'Y'))) { $Res=1; } if ($Res != 0) { $e_tag=$tag.'_'.$Res; $e_brewer[$e_tag]=TRUE; } } if ($brewer['BREWCLUB'] == 'Other' && empty($brewer['OTHER'])) { $e_brewer['OTHER_R']=TRUE; } if (count($e_brewer) == 0 && (!$Edit || ($brewer['EMAIL'] != $brew_row['email']))) { $query='select count(*) from accts where name="'.$brewer['EMAIL'].'" and acct_type="B"'; $cnt_res=mysqli_query($db, $query); $cnt_row=mysqli_fetch_row($cnt_res); if ($cnt_row[0] > 0) { $e_brewer['DUP']=TRUE; } } if ($Edit) { $Args='k='.$Key.$Add.'&a=u'; } else { $Args=($AdminAcct ? 'k='.$Key.'&' : '').'a=c'; } if (count($e_brewer) > 0) { if (array_key_exists('RELOAD', $e_brewer)) { $Page='brewer.php?'.$Args.'&s=0'; } elseif (array_key_exists('DUP', $e_brewer)) { $Page='brewer_dup.php?'.$Args; } else { $Page='brewer.php?'.$Args.'&s=1'; } } else { $Page='brewer_upd.php?'.$Args; } ?>

Validating Brewer Information

'."\n"; echo '