Currently, I'm developing an application using standard PHP. As such, there are assorted functions that are called from forms. Some examples include registration, login, logout, and others.
Rather than creating a separate file for each function, I'm using a phpscripts.php
file in the includes folder. To execute a function from html input, I pad the URL with ?action=functionName
. Inside the script file, I use a switch/case tree to execute the proper function based on the S_GET['action']
variable.
Is there a better way to implement HTML calls to PHP functions?