- Example form, https://stackoverflow.com/questions/ask and I save this
page to desktop. - Then I edit the
action="/questions/ask/submit"to full URL and submit.
Question
On the process form how do I validate that submit process will return to error page or denied if situation like this?
If I understood your question correctly, you want to prevent someone from submitting a form from an external site (not your server).
The solution is quite simple, add a session variable to someone accessing your form page, and check for that on the handler page. If someone doesn’t have the correct session variable, the request would then be denied.
Edit based on comments.
The price of a product is not a user input. It’s not something to be inputted by the user, it’s something to be determined by the server. You shouldn’t have a hidden input containing the product price. Only the product ID, and take the price from a database.