It’s possible and is a fundamental concept of php (and other web technologies). Consider php manual on $_REQUEST, $_GET and $_POST.
You can find concrete example of usage from stackoverflow here, especially second part of the accepted answer should be interesting for you.