Forums
This topic is locked
Prevent PHP Post script from being run
Posted 13 Aug 2011 06:39:41
1
has voted
13 Aug 2011 06:39:41 shadoiqw kolo posted:
Hey everyone, what I am guessing is a small problem has me stuck. Just looking for a quick pointer. Basically I have a form on my site. When you submit it, it directs you to another page that actually takes the data (via POST and stores as php variables) and then it ends up doing a couple things including sql queries and a php mail script. My problem is that I think when browsers and maybe other users are going directly to this page, it is making blank queries and sending blank emails because obviously the variables that would normally be there from the form and POST are empty, because the user browsed directly to this action page.
Is there any way to stop this page from loading unless a person is referred to it from my original page that houses the form?
Any ideas?