in reply to Checking where my CGI is bing called from.
And to make sure, it's clear, $mypage in turnstep's example would be the URL for your form. In other words, if the URL for your form was:
you would want to set $mypage equal to that. Also, to make sure it exits gracefully if someone just goes directly to the script, I would put the following early on in it:http://www.mydomain.com/pages/myform.html
This will send them back to $errorURL if they try to go to the script directly rather than giving a possible 500 error.$errorURL = 'http://www.mydomain.com/mypage.html'; if (!defined $ENV{HTTP_REFERER}) { print "Location: $errorURL\n\n"; exit; }
|
|---|