I have a form that uses POST method to post to different php file. So users outside my server can inspect the form and get the action url and also they can get the hidden value token and submit it from different servers. How can I prevent this from happening?
All the answers that I have found seems like the form was submitted to the same page. In my case the form will be submitted to different page.In this case if the attacker is loged in to my site and inspects the form, he will simply get the token and can send POST request using that token.