#!/usr/bin/perl -w use strict; require 'html.pl'; use lib './MyLib'; use DBI; my $dbh = DBI->connect('dbi:AnyData(RaiseError=>1):'); $dbh->func( 'users', 'CSV', 'users.csv' 'ad_catalog'); my $sth = $dbh->prepare("SELECT surname FROM users"); $sth->execute(); while (my $row = $sth->fetch) { print "@$row\n"; } # define variables header(); print("
");
print ("Menu "); print ("==== "); print ("Create New User "); print ("Login User "); print ("User Admin "); print(" | ");
print("");
print ("CREATE USER "); print ("========== "); print ("This is where the code to create new users will be placed"); print (" "); print ("USER VARIABLES "); my %user_data = qw( id blank first_name blank surname blank date_of_birth blank email blank password blank active blank last_login blank create_date blank earnings blank cash blank judoka_limit blank sensei_limit blank dojo_limit blank team_limit blank rank blank ); open (OUTFILE, ">./user_data/test_user"); while (($a, $b) = each(%user_data)){ print ("Key = $a and its value is $b "); print OUTFILE ("$a\n$b"); } close (OUTFILE); print (" USERS ON SYSTEM "); opendir(USERS, "./user_data"); while ( my $name = readdir(USERS)) { if ($name ne '.' and $name ne '..') { print ("$name "); } } closedir(USERS); print(" |