yauncin,
okay i changed the code....
now it dosnt even read that part of the code..... what am i doing wrong? here is the ENTIRE code....
#!/usr/bin/perl
my %In = ();
#########################################################
# Copyright (c) 2000 SKosterow.com All Rights Reserved. #
# #
# This Document was Created By: Scott Shawn Kosterow #
# This Document Created for SKosterow.com and is the #
# sole property of SKosterow.com and reproduction, #
# copying or transfer by any media type or means in #
# prohibited by laws of the United States of America #
# #
# CONTACT INFORMATION: #
# #
# Address: #
# 16080 A Radcliff Place #
# Aurora, Co 80015 #
# #
# Phone: #
# 303-353-2212 #
# #
# E-Mail: #
# webmaster@skosterow.com #
# #
#########################################################
#########################################################
# Set USER Variables
#########################################################
# Directoy Setings
$url = "/skosterow.com"; # ROOT Directory or URL
$dir = "/bin/quiz"; # Path to Quiz Directory
$this_script = "/quiz.cgi"; # This Scripts File Name
$quiz_file = "/datfile.txt"; # Quiz File Name
$header_file = "/header.html"; # HTML Header File Name
$footer_file = "/footer.html"; # HTML Footer File Name
# Other Settings
$exam_name = "Test Name Here"; # Exam Name
$site_name = "Site Name Here"; # Site Name
#########################################################
# DO NOT EDIT ANYTHING BELOW THIS LINE
#########################################################
# Counters
$c1 = 0; # Counter 1
$c2 = 0; # Counter 2
$c3 = 0; # Counter 3
# User Data
# $user_name = " "; # Testers name
$user_email = " "; # Testers E-mail Address
$user_questions = " "; # Number of questions User wants to take
$date = scalar localtime(time); # Get Date for exam
# Set Other Data Files Used
$practice_data = "/practice-data.txt"; # Practice Exam Questions
# Set Directories
$data = "/data"; # Data Directory for script
$quiz_dir = "$url$dir$data$quiz_file"; # Quiz files full path
$header_dir = "$url$dir$data$header_file"; # Header file full path
$footer_dir = "$url$dir$data$footer_file"; # Footer file full path
$script_dir = "$dir$this_script"; # This Scripts full path
$practice_data_dir = "$url$dir$data$practice_data"; # Practice Data full path
# Other Variables and what they are
# $action = "none";
@header_html = " "; # Header HTML
@footer_html = " "; # Footer HTML
@practice_data_raw = " "; # Practice Data Read From File
@split = " "; # Data splitter
$quiz_data = " "; # Quiz Data Array
#########################################################
# Open Needed Files
#########################################################
# Get HTML Header File
open (HEADER, "$header_dir"

or die "Cannot open $header_dir for read :$!";
@header_html = <HEADER>;
close (HEADER);
# Get HTML Footer File
open (FOOTER, "$footer_dir"

or die "Cannot open $footer_dir for read :$!";
@footer_html = <FOOTER>;
close (FOOTER);
#########################################################
# Start Script
#########################################################
if ($action eq ""

{
print @header_html;
&name_form;
print "Action1: $action";
print @footer_html;
&parse ();
print "Action 2: $action";
}
elsif ($action eq "Start"

{
print @header_html;
&logged_in;
print @footer_html;
} else { }
exit;
#########################################################
# SUBRUTINES
#########################################################
sub parse
{
return 0 unless $ENV{REQUEST_METHOD} =~ /POST/i;
my $buffer;
read(STDIN,$buffer,$ENV{CONTENT_LENGTH});
my @form_data = split(/&/,$buffer);
foreach(@form_data)
{
$_ =~ tr/+/ /;
my ($n,$v) = split(/=/,$_,2);
$n =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
$v =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
$v =~ s/(\<.*?)(embed|object|script|applet)(.*?\>)/$1$3/gis;
if($In{$n}) { $In{$n} .= "\t$v"; }
else { $In{$n} = $v; }
}
$c1 = 0;
$c2 = 0;
foreach (@form_data)
{
@split = split (/\=/, @form_data[$c1]);
$data[$c2+1] = @split[0]; # Image
$data[$c2+2] = @split[1]; # Question
$c1 = $c1 + 1;
$c2 = $c2 + 2;
}
$user_name = $data[2];
$action = $data[6];
}
#########################################################
sub name_form
{
print "<form method=post action=quiz.cgi>";
print "Name:";
print "<input type=text name=username>";
print "Email:";
print "<input type=text name=email>";
print "<input type=hidden name=action value=Start>";
print "<input type=submit value=Send>";
print "</form>";
}
sub logged_in
{
print "$action";
print "$user_name";
}