#!/usr/bin/perl -w use CGI qw(:standard); #print header; $fc1=param('fname'); $fc2= $fc1 =~ m/^\w+$/; $fc3=param('loginid'); $fc4= $fc3 =~ m/^[a-z|0-9]+$/; $fc5=param('pass1'); $fc6= $fc5 =~ m/^\w+$/; $fc7=param('pass2'); $fc8= $fc7 =~ m/^\w+$/; $fc9=param('lname'); $fc10= $fc9 =~ m/^\w+$/; $fc11=param('secq'); $fc12= $fc11 =~ m/[^:]/; $fc13=param('ans'); $fc14= $fc13 =~ m/[^:]/; if((param('loginid')) && (param('pass1'))&&(param('pass2'))&&(param('fname')) &&(param('lname'))&&(param('secq'))&&(param('ans'))&&($fc2==1)&&($fc4==1)&&($fc6==1)&&($fc8==1)&&($fc10==1)&&($fc12==1)&&($fc14==1)) { $name=param('loginid'); $pass1=param('pass1'); $pass2=param('pass2'); $fname=param('fname'); $lname=param('lname'); $secq=param('secq'); $ans=param('ans'); if($pass1 eq $pass2) { dbmopen(%updata,"/etc/httpddata/passdata.dat",0400); dbmopen(%comp,"/etc/httpddata/comp.dat",0400); dbmopen(%user,"/etc/httpddata/nuser.dat",0600); if((!defined $updata{$name})&&(!defined $comp{$name})&&(!defined $user{$name})) { $user{$name}=$pass1; } else { dbmclose %user; dbmclose %comp; print "Location: http://www.myproject.com/uexist.htm\n\n"; exit; } dbmclose %user; dbmclose %comp; } else { print "Location: http://www.myproject.com/passmm.htm\n\n"; exit; } } else { print "Location: http://www.myproject.com/invup.htm\n\n"; exit; } dbmopen(%pidata,"/etc/httpddata/comudata.dat",0600); $message="$fname:$lname:$secq:$ans"; $pidata{$name}="$message"; dbmclose %pidata; #dbmopen(%user,"/etc/httpddata/nuser.dat",0400); dbmopen(%pidata,"/etc/httpddata/comudata.dat",0400); ($fn,$ln,$sq,$as)=split(':',$pidata{$name}); print header; print <<"EOM"; confirmation

confirmation

Home
Up
Members
Archive
Project Information
Contact Information

 

 Thank You For Registration with www.myproject.com.

 For Confirmation this is your account information.

  Your User-ID is "$name"

   Your Email ID is "$name\@myproject.com"

   Your Password is "$pass1"

   Your Name is "$fn $ln"

   Your Secret question is "$sq"

   Your answer is "$as"

   Your Website information is provided to you through E-mail.

   If you did not receive E-mail subject "welcome" then contact me at webmaster\@myproject.com

Home | Members | E-Mail | Archive | Project Information | Contact Information

 

EOM dbmclose %pidata;