Skip to content

Instantly share code, notes, and snippets.

@bradwright
Created January 30, 2009 11:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bradwright/55028 to your computer and use it in GitHub Desktop.
Save bradwright/55028 to your computer and use it in GitHub Desktop.
<?php
function string_convertFormVarToLocal_default($name, $default='') {
$tmp = $default;
if (isset($_GET[$name])) {
$tmp = strval($_GET[$name]);
} else if (isset($_POST[$name])) {
$tmp = strval($_POST[$name]);
} else {
return $tmp;
}
return ($tmp);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment