There is no common basepath for both the client- and the server-side of your application.
On the client side, all paths are relative to the current url or absolute which is relative to the base url / domain name.
On the server side your are dealing with the file-system.
So if your site root on the server-side ($_SERVER["DOCUMENT_ROOT"]
) is something like /home/some-user/www
and your form processor is located at /home/some-user/www/assets/inc/process-form-1.php
, that is the exact path you need on the server-side (if you want to use absolute paths...).
However, on the client-side, your action
would point to a relative path or an absolute path which in this case would be /assets/inc/process-form-1.php
; an absolute path relative to the root of the web-server.