Click to See Complete Forum and Search --> : if Statements not working???


druss
01-23-2003, 09:58 PM
i dont know why the hell the following dont work?

if ($details[2] eq "down") {
if ($refferer =~ m"$corehost[0]" || $refferer =~ m"$corehost[1]") { &download; }
}


for some reason when i have the if statements alone they work fine but when there together like this it acts as if its false, when it actually should return true??

ALSO: i have executed the script through the meta refresh tag. does this effect the refferer in any way?


Thanks
Goran

Nedals
01-24-2003, 02:41 AM
Worked for me..

if ($refferer =~ m"$corehost[0]" || $refferer =~ m"$corehost[1]") { print "true\n"; } else { print "false\n"; }

Remember it's case sensitive!!

druss
01-24-2003, 06:42 AM
i figured out the problem!

it seems that when i have this tag -
<META HTTP-EQUIV=Refresh CONTENT="0; URL=$leech_url?$name&$file&down">
- no refferer shows up, ive tried to print it but its just blank?? why dosent it show where its coming from, also is there another way to automatically redirect cause javascript dont have refferer niether?

Thanks
Goran