#!/usr/local/bin/perl
&getcookie;
print "Content-type: text/html\n\n";
print"<body><form action=setdefault.pl method=post>";
print"<select name=begin>";
print"<option value=thaiall.com ";
if ($v{'begin'} eq "thaiall.com") {print "selected";}
print">thaiall.com<option value=thainame.net ";
if ($v{'begin'} eq "thainame.net") {print "selected";}
print">thainame.net<option value=thaiabc.com $c";
if ($v{'begin'} eq "thaiabc.com") {print "selected";}
print">thaiabc.com</select>";
print'<input type=submit value="Save as default"></form>';
sub getcookie {
use CGI qw/:standard/;
use CGI::Cookie;
%Cookies = fetch CGI::Cookie;
foreach $r (keys %Cookies) {
@rec = split(";",$Cookies{$r});
($name,$value) = split("=",$rec[0]);
$v{$name} = $value;
}
}
จำนวน : 24 บรรทัด