When designing a php form I am sure everybody wants to make sure that the user who is submitting data is actually on "their site" and not submitting remotely.
Ways of preventing this are captchas and other such ideas to prevent spam. How practical and secure is it to lets say create a hidden field in the form call 'token'. This can be a randomly generated alphanumeric ID of length 10. You store this value in a session variable as soon as the page loads, and when the form gets submitted you check to make sure the token matches your session variable.
Now my question is, does that prevent a user from let's say creating a dummy form on some external site and submitting data over to mine? I have some forms that I do not want to use a captcha on, but I want to make sure the user is on "MY SITE" and not some remote one.
I am trying to find a sure way to prevent the submission of forms from somewhere else without using a captcha.
Any help would be appreciated to shed some light for me on this topic.
Thanks.