I want to create a script file that I can call using a form on submit. For example I can use:
This would trigger the script to result in the function deleteuser in file action.php deleting uid 1. However, when I tried to create this file and put it in the home scripts folder it couldn't call basic drupal commands such as db_query. Where and how can I generate such a script file so that I can access drupals core functions?