#!usr/local/bin/perl; package studentdata; use lib '\\\\140.247.216.106\\inetpub\\wwwroot\\cyberweek'; use CGI ("shortcuts"); use CGI::Carp qw(fatalsToBrowser); $query=new CGI; #Use the ODBC module use Win32::ODBC; #our dsn use ISLib; my $DSN='DRIVER={Microsoft Access Driver (*.mdb)};DBQ=\\\\140.247.216.106\\inetpub\\wwwroot\\cyberweek\\database\\cyberweek.mdb'; print $query->header(); my $ISobj= new ISLib('Edit Student Profile'); print $ISobj->pagetop(); #open a connection to it my $O = new Win32::ODBC($DSN) || die "Unable to open DSN $DSN\n"; ##The page is called by StudentID or "new" ##Grab any existing data my %sdata; %sdata=(); if ($query->param('StudentID') eq "") { $StudentID = "new"; $sdata{'FirstName'}=$query->param('FirstName'); $sdata{'LastName'}=$query->param('LastName'); } else { $StudentID = $query->param('StudentID'); if (! $O->Sql("SELECT * FROM Students WHERE StudentID = $StudentID ")) { ( $O->FetchRow() ) || print $O->DumpError(), "\n"; %sdata = $O->DataHash(); } } $O->Close(); print qq[

]; # print "Student ID:",$query->param('StudentID'); unless ($StudentID eq "new"){ print qq! \n \n \n !; } else { print qq!
Name: $sdata{'FirstReal'} $sdata{'LastReal'}
\n ! } print qq! \n \n \n \n \n \n \n \n
First Name:
Last Name:
Email: \n
Affiliation: \n
Hometown:
Favorite website (URL):
Internet-related research interests:
Favorite book:
Fun facts about you:
Password:
Enter password again:

   

 

Check this box to specify a nickname to be used in place of your real name:

Public first name:   Public last name:
!; print qq! \n

!; print $ISobj->pagebottom;