# ganti isi dari $link dibawah ini dengan alamat situs anda $link ="http://go-zila.tripod.com/"; # ini adalah file berisi database. Dalam latihan ini isi dari $ file tidak perlu anda rubah $file ="/results.txt"; #must be read/writable # ################################################################## if ($ENV{'REQUEST_METHOD'} eq 'POST') { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $contents{$name} = $value; } } chop($date = `date`); # Now with the program ########################################################### # Has to output a Content-type print "Content-type: text/html\n\n "; # Check to see if all required information was entered # Jika anda ingin tambahkan field,tambahkan disini. &no_cigar unless $contents{'nama'}; &no_cigar unless $contents{'alamat'}; sub no_cigar { print <<"HTML";
Thank you.