Fixing REQUEST_METHOD undefined index issue