jan-vandenberg / cruddiy

No-code Bootstrap PHP CRUD generator
http://cruddiy.com
GNU Affero General Public License v3.0
252 stars 80 forks source link

Consider REQUEST_URI for form actions instead of PHP_SELF? #134

Open interactiveRob opened 7 months ago

interactiveRob commented 7 months ago

I'm running Cruddiy as an app in a subfolder using a custom NGINX config. My path is localhost:8080/cms/ for example.

Cruddiy creates subfolders like app etc after initial setup. Then on http://localhost:8080/cms/app/jobs-create.php for example the form action determined by PHP_SELF is just app/jobs-create.php.

To make it work for my routing situation I ran a find/replace to swap all instances of PHP_SELF with REQUEST_URI.

REQUEST_URI points to the proper form action cms/app/jobs-create.php. Any reason why we wouldn't want to use REQUEST_URI instead?