I want to send my form request to a folder which is not public accessible. My directory structure is like this-
I tried with this code-
<form action="../inc/action.php" method="POST">
But, it shows 404! Not Found error while I submit the form. It says the path - mysite.com/inc/action.php is not found.
Is there any way in php to process form request in private directories?
You should take a look at the "Front controller" design pattern, https://en.wikipedia.org/wiki/Front_controller
Basically it means you let a file in you public folder (ex. index.php, app.php,...) handle every web request. The code in that file will then determine which files needed to be executed/loaded in your private folder.