I got this code:
{
print "Location: http://www.altavista.digital.com/cgi-bin/query?q=$c\n\n";
}
elsif ($c2 eq "Open Directory")
{
print "Location: http://search.dmoz.org/cgi-bin/search?search=$c\n\n";
}
elsif ($c2 eq "Yahoo")
{
print "Location: http://search.yahoo.com/bin/search?p=$c\&n=$c3\n\n";
}If $c2 is Alta Vista, the the script should redirect to Alta Vista search engine, and search it with $c. When I run the script it doesn't redirect me to Alta Vista, but it prints:
Location: http://www.altavista.digital.com/cgi-bin/query?q=TEST
Why is it?
Code:
if ($c2 eq "Alta Vista") {
print "Location: http://www.altavista.digital.com/cgi-bin/query?q=$c\n\n";
}
elsif ($c2 eq "Open Directory")
{
print "Location: http://search.dmoz.org/cgi-bin/search?search=$c\n\n";
}
elsif ($c2 eq "Yahoo")
{
print "Location: http://search.yahoo.com/bin/search?p=$c\&n=$c3\n\n";
}
Location: http://www.altavista.digital.com/cgi-bin/query?q=TEST
Why is it?