I would like to be able to call a subroutine based on meeting an HTTP_REFERER qualification and using input from a select box in a form to define the sub-routine that is called. What I can not figure out, being an embarrassingly uninformed newbie, is how to write the code to replace ($action) in the subroutine call after the condition is met. Can anyone please help me solve this problem?
here i shortended the if statment for the referer so this way, you use less lines and server memory,
that should do whant you want, but still there are better ways, depending what you want, so if you could explain the hole thing, we migh give you a better solution,
if it is like for making a hole site into one script tell me, that the way i work
sure you could but it is better to stay with just one script for it all.
what i do for scripts like this, (sites Like this one ) is set a simple zone variable $z, and then redirect into the script using subroutines, for each zone in the site.
like
if ($z eq 1) {&main_page}
elsif ($z eq 2) { &surveys}