I have written a function:
function url_query(){
if (is_numeric($_GET['cmd'])) {
$get = $_GET['cmd'];
}
return $get;
}
but I want that this function be global. This function works only for eg.
index.php?cmd=...
Can I revise this function to use for index.php?page=… and index.php?catID=… etc?
Thanks
I’ve ensured that the return value is null if the parameter is not numeric, so that client code has to explicitly check for that case.