#!/usr/bin/perl

use CGI qw(:standard);
print header();

$ipmsmrmiss   = param('msmrmiss');
$ipfirstname  = param('firstname');
$iplastname   = param('lastname');
$ipmailingadd = param('mailingadd');
$ipcity       = param('city');
$ipstate      = param('state');
$ipzip5       = param('zip5');
$ipzip4       = param('zip4');
$ipemail      = param('email');
$ipphone      = param('phone');
$iptopic      = param('topic');
$ipmessage    = param('message');
$ipcard       = param('card');
$ipdate       = param('date');

@days = ("Sunday","Monday","Tuesday","Wednesday","Thursday",
	   "Friday","Saturday");
@months = ("January","February","March","April","May","June",
	     "July","August","September","October","November",
	     "December");

($sec,$min,$hr,$mday,$mon,$year,$wday,$yday,$isdst) = 
localtime(time);
$year = $year + 1900;
print "Today is $days[$wday], $months[$mon] $mday, $year.\n";



print "Here's what you entered:";                  print "<br>";
print "Ms/Mr/Miss        : $ipmsmrmiss";           print "<br>";
print "First Name        : $ipfirstname";          print "<br>";
print "Last Name         : $iplastname";           print "<br>";
print "Mailing Address   : $ipmailingadd";         print "<br>";
print "City              : $ipcity";               print "<br>";
print "State             : $ipstate";              print "<br>";
print "Zip Code          : $ipzip5 4Pin $ipzip4";  print "<br>";
print "Email Address     : $ipemail";              print "<br>";
print "Phone             : $ipphone";              print "<br>";
print "Credit Card Number: $ipcard";               print "<br>";
print "Exiration Date    : $ipdate";               print "<br>";
print "Topic             : $iptopic";              print "<br>";
print "Message           : $ipmessage";            print "<br>";


if($ipfirstname=~ /[<>]|http/) {
 print"the data error";
}


$value = "msmrmiss = $ipmsmrmiss & firstname = $ipfirstname & 
	lastname  = $iplastname & mailingadd= $ipmailingadd & 
	city      = $ipcity     & state     = $ipstate      &
	zip5      = $ipzip5     & zip4      = $ipzip4       & 
	email     = $ipemail    & phone     = $ipphone      &
	topic     = $iptopic    & message   = $ipmessage    & 
	card      = $ipcard     & date      = $ipdate ";

print "Value --> $value";print "<br>";

dbmopen %paricipant,"data/dbparicipant", 0666;
	
	$paricipant{$ipemail} = $value;
	
dbmclose %paricipant;

