Forum Moderators: coopster
if ($_GET['foo']) $bar = 'whatever'; function FormVar($ifld,$dflt) {
$tmp=""; $fld=$ifld;
if (isset($_REQUEST[$fld])) { $tmp=$_REQUEST[$fld]; }
if (empty($tmp)) { $tmp=$dflt; }
$tmp=htmlspecialchars($tmp);
$tmp=trim($tmp);
return($tmp);
}
function FormVarG($fld) {
$tmp=FormVar($fld,"");
if (empty($tmp)) {
$tmp=(isset($_GET[$fld]) ? $_GET[$fld] : "");
$tmp=htmlspecialchars($tmp);
$tmp=trim($tmp);
}
return($tmp);
} Is this a new thing in PHP 7.x
if ($_GET['foo']) $bar = 'whatever';
$tmp=(isset($_GET[$fld]) ? $_GET[$fld] : "");
$tmp = $_GET[$fld] ?? "";
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
and this to ignore duplicates, unless you guys and gals say it's a mistake for some reason:
ignore_repeated_errors = On error_reporting(E_ALL);