#!/usr/local/bin/perl use CGI; $query = new CGI; my ($number, $fav1, $fav2, $fav3, $fav4, $fav5, $cookie); my $nextpage ='http://www.domain.co.uk/'; if (m/^(\d+)&addfavlink/) { $number = $1; $addfavlink = "id".$number; $cookie = $query -> cookie( -NAME => 'FAV5LINK', -VALUE => '$fav1', '$fav2', '$fav3', '$fav4', '$fav5', -EXPIRES => '+1y', -DOMAIN => '.domain', -PATH => '/', -SECURE => '0' ); print $query -> header( -COOKIE => $cookie, -LOCATION => $nextpage."userchoice.shtml?id=$number&added" ); } elsif (m/^(\d+)&removefavlink/) { $cookie = $query -> cookie( -name => 'FAV5LINK', -VALUE => '$fav1','$fav2','$fav3','$fav4','$fav5', -EXPIRES => '-1h', -DOMAIN => '.domain, -PATH => '/', -SECURE => '0' ); print $query -> header( -COOKIE => $cookie, -LOCATION => $nextpage."removed.html" );
} exit 0;