You are on page 1of 93

DESIGN AND IMPLEMENTATION OF

ONLINE REGISTRATION PORTAL


(A CASE STUDY OF HASSAN USMAN KATSINA POLYTECHNIC)

BY

ISYA ISYAKU

N12CS059

ABUBAKAR MUHAMMAD

N12CS092

BILKISU BASHIR

N12CS030

BEING A PROJECT WORK SUBMITTED TO


DEPARTMENT OF COMPUTER STUDIES,
COLLEGE OF SCIENCE AND TECHNOLOGY,
HASSAN USMAN KATSINA POLYTECHNIC.

IN PARTIAL FULFILLMENT OF THE REQUIREMENT FOR THE


AWARD OF NATIONAL DIPLOMA IN COMPUTER SCIENCE

DECEMBER, 2014.

APPROVAL PAGE
This project has been read and approved having satisfied the requirement of
the Department of Computer Studies, College of Science and Technology, Hassan
Usman Katsina Polytechnic, for the award of National Diploma in Computer
Science.

____________________________

_________________________

MalamaLubabatuSadaSodangi

Date/Sign

(Supervisor)

____________________________

_________________________

MalamAbubakar Ahmad Gachi

Date/Sign

(Project Coordinator)

____________________________

_________________________

HajiyaMariyaSalihuIngawa

Date/Sign

(Head of Department)

CERTIFICATION
We hereby certify that, this project work titled Design and Implementation
of Online Registration Portal was carried out and conducted by ISYA ISYAKU,
ABUBAKAR MUHAMMAD, BILKISU BASHIR under the supervision of
MALAMA LUBABATU SADA SODANGI. All texts consulted and other sources
for materials used in this work have been duly acknowledged in the bibliography and
the project has never been submitted to any institution for an award.

ISYA ISYAKU

Sign: _____________________

(N12CS059)

ABUBAKAR MUHAMMAD

Sign: _____________________

(N12CS092)

BILKISU BASHIR

Sign: _____________________

(N12CS030)

DEDICATION

This project work is dedicated to Allah (SWT) whose if not for His
immense grace in our lives we wouldnt be here. We also dedicated
this project to our beloved parents, brothers, sisters and all our family
members for their constant encouragements.

ACKNOWLEDGEMENT

All gratitude to Almighty Allah who gave us the ability, courage and opportunity
to complete this programme successfully
We are profoundly to our mentor MalamaLubabatuSadaSodangi who went
through this project report with eagle eyes and cusored each beat meticulously. It is also
necessary

to

extol

our

indefectible

lecturers;

MalamSani

Suleiman

Isah,

MalamUsmanHamza, MalamAbubakar Ahmad Gachi, The Head of Department


HajiyaMariyaSalihuIngawa, all in the Department of Computer Studies, may Allah
(SWT) grant you your heart desires and Jannatu-l Fir-dausi, amen.
Our sincere gratitude goes to our parents for their financial and moral support
rendered to us.
This acknowledgement is incomplete without your names our unforgettable
course mates and friends, Tanimu Jaafar, Salisu Lawal, Abdurrazaq Ibrahim, Nazir
Isyaku, Yashim Iliya Gabriel, Mohammed Bello Bala, MuhammedAminu, Fauziya
Ibrahim Bakori etc. as well as all those who assisted us financially, morally,
intellectually and prayerfully. May Almighty Allah reward you abundantly, ameen.

ABSTRACT
The Online Registration Portal is a research work designed and implemented
toprovidethe easiest way to replace the existing manual system used for students to
register their courses to be offered for each semester as well as entering their
personal data. The program has to provide and elucidate a means by which the
record of each and every students entity be arranged according to Database system.
The system was developed using HTML and PHP in designing the front end, MySQL
to create the databases as the back end and phpmyadmin serve as the interface
between the front end and the back end to provide the opportunity for storing,
editing, adding and deleting data as the case may be. Hassan Usman Katsina
Polytechnic is the case study where all the necessary data were collected in the
process of designing the system.

TABLE OF CONTENTS
Contents
Pages
TITLE PAGE i
APPROVAL PAGE.......................................................................................................ii
CERTIFICATION........................................................................................................iii
DEDICATION.............................................................................................................iv
ACKNOWLEDGEMENT............................................................................................v
ABSTRACT................................................................................................................vi
TABLE OF CONTENTS............................................................................................vii
CHAPTER 1.................................................................................................................1
GENERAL INTRODUCTION.....................................................................................1
1.1

Background of the Study................................................................................1

1.2

Statement of the Problems.............................................................................1

1.3

Aim and Objectives........................................................................................2

1.4

Justification of the Study................................................................................3

1.5

Scope and Limitation.....................................................................................3

CHAPTER 2.................................................................................................................4
LITERATURE REVIEW..............................................................................................4
2.1

Introduction....................................................................................................4

2.2

Online Registration........................................................................................5

2.2.1

Benefits gain from Online Registration..................................................5

2.3

Manual Registration.......................................................................................6

2.4

Web Programming.........................................................................................6

2.5

AMP...............................................................................................................7

2.5.1

Apache....................................................................................................8

2.5.2

PHP.........................................................................................................8

2.5.3

My-SQL..................................................................................................9

2.5.4

HTML...................................................................................................10

CHAPTER 3...............................................................................................................11
RESEARCH METHODOLOGY................................................................................11
3.1

Introduction..................................................................................................11

3.2

Methodology................................................................................................11

3.2.1

Waterfall Model....................................................................................11

3.2.1.1

Analysis.............................................................................................12

3.2.1.2

Target Population..............................................................................13
7

3.2.1.3

Instrument for Data Collection..........................................................14

3.2.1.4

Observation.......................................................................................14

3.2.1.5

Interview...........................................................................................14

3.2.1.6

Validation and Reliability of the Instrument.....................................14

3.2.2
3.2.3

Design...................................................................................................15
Development.............................................................................................18

3.2.3.1

Technical Tools used for the Research..................................................18

3.2.3.2

Justification of the above tools.............................................................18

3.2.4

Justification for chosen the Model (Waterfall).....................................19

CHAPTER 4...............................................................................................................20
RESULTS AND DISCUSSION.................................................................................20
4.1

Introduction..................................................................................................20

4.2

Design of the New System...........................................................................20

4.2.1

Input interface of the new system.........................................................24

4.2.2

Database and output of the new system................................................26

4.3

System Requirements...................................................................................27

4.4

The achieved objectives of the system.........................................................28

CHAPTER 5...............................................................................................................29
SUMMARY, CONCLUSION AND RECOMMENDATION....................................29
5.1

Summary......................................................................................................29

5.2

Conclusion....................................................................................................29

5.3

Recommendation..........................................................................................29

REFERENCES...........................................................................................................30

CHAPTER 1

GENERAL INTRODUCTION

1.1

Background of the Study


Online registration portal is a kind of form requested by the user,
where a user can have full interaction with the database, with respect to
his/her own record. User can store, retrieve and even modify his record
from/in a database in respective of where the user is located, provided he is
connected to internet. Online registration portal is among the services that are
provided online.
Many organization and other related industries are enjoying this
service for some years. While other are now migrated from their manual
process in order to go with current information technological system. This
research project examine the registration exercise in Hassan Usman Katsina
Polytechnic, Katsina and come up with online application system that will
help the college to conduct its registration (effectively, efficiently and
economically worthwhile) online.
The Online Registration Portal provides for students the option to
register courses offered by their colleges during the scheduled registration
periods. The students can modify their courses selection by adding and/or
dropping courses. However, when the registration period is over, all
previously registered courses by the students will be viewable in the system
(Welback, 2008).
The project was developed using HTML and PHP in designing the
front end, MySQL to create the databases as the back end and phpmyadmin
serve as the interface between the front end and the back end.

1.2

Statement of the Problems


Manual registration exercise faces a number of problems, among which
are;
The need for lot of manpower to manage the registration process (even
though the process will not be effective and efficient).
1

The growing nature or the increasing number of student admitted every year
implies much more requirement of manpower to manage the system and this
has cause a lot of difficulties in locating a file that belongs to a particular
person.
There is also a tendency of misplacing or missing a student record. This
occurs due to the crowd when submitting the registration document.
Time and economic are the main factors that shall be taken into consideration
when designing any system. Manual registration process does not favour
these factors, because each department in the college has to provide their
registration document at the beginning of each semester and the unused ones
may be wasted after the registration in some cases. In some cases the form
would not be ready for the students in time even if the form is ready the
students has to join a long queue for them to collect their registration form
which takes long time.
Using computer solution online portal as a tool for registration the
problems stated above can be addressed. Some problems can be eliminated; some
can be reduce to the minimal level.

1.3

Aim and Objectives


Aim:
The research work is aim to analyze the current system and to develop
new online system through the following objectives:
Objectives:
1. To provide online software that enable student to register with the
polytechnic online, irrespective of where the student is located.
2. To create a central database that interacts with student during the
registration.
3. To provide a readymade online registration form.
4. Eliminate the tedious work by staff during registration exercise.
5. Provide quick search for students record

1.4

Justification of the Study


There is some evidence to support the contention that students in
general, and school administration (registry office) in particular, are not being
well served by the existing manual system of registration.
The failure to develop computerized system is part of an overall
problem related to difficulties in locating a file that belongs a particular
person, crowd when submitting registration documents etc. In looking at
growing nature or the increasing number of students admitted every year, the
need for computerized system must be realistically addressed.
The important contribution made by computer in registration process
justifies the necessity to make the system more equitable. The above
background, therefore, provides the necessary basis and justification for this
research study.

1.5

Scope and Limitation


The project/research work is strictly focusing attention on finding an
easier way of making registration through internet very effective. Thus, the
scope of the project cover the registration process in Hassan Usman Katsina
Polytechnic and it limited to student personal information as well as course
registration.

CHAPTER 2

LITERATURE REVIEW

2.1

Introduction
Online registration can be divided into three stages of development.
The first stage is the 1970s. This is a "developing stage" in which some
universities led higher education institutions to experience initial new
technology application in administration (Michael, 1976; Chapman &
Gambrell, 1976; Brown, 1979; Hengehold & Keim, 1975; Adams, 1974).
During this stage, online registration underwent a period of experiments and
testing. Online registration was beginning to be recognized for its operation
in assisting university administration.
The second stage refers to the decade of the 1980s. During these
years, online registration was widely used by universities across the word.
New features in the registration process were added and more experience was
summarized (Heard, 1987; Cook & Parker, 1983; Arnett & Posey, 1986;
Lonabocker & Long, 1983; Lisker, 1987). This period can be viewed as the
"stabilized stage." Cook & Parker (1983) conducted a survey of online
registration practices among 66 colleges and universities. They found that
online registration had improved academic advising. Lisker summarized that
thenew technology application had saved time for students, faculty and staff
members (1987). Online registration has been clearly confirmed as "a
successful approach" (Lonabocker & Long, 1983; Arnett & Posey, 1986).
The third stage includes the 1990s and beyond. This period can be
viewed as the "enhancement stage." There have been new ways of exploring
online registration such as using web service (Swein, 1997), integration of
internet technology into all phases of the education process (Thomas,
Carswell & Price, 1998), and getting specific groups of students involved in
online registration (Kelly, 1998). Thomas et al. pointed out that the
integrative approach has been effective in university administration. The third
stage indicates that online registration has been well developed, looking for
4

new ways to enhance the new technology environment through new


technology convergence.
A recent study of online registration services concurs with this
observation, concluding that: the general problem with manual system slow
retrieval of data - the information stored by students are in different parts of
the site and take a long time to retrieve the data. In all it can take up to 30
minutes finding the relevant information of student (von Blackenburg,
2006). Paper takes up a massive amount of room in the site. If a computer
were bought the paper could all go and there would be lots more free space
which could be used for other purposes.
Online Registration Portal is a system that allows students through the
internet, to register, drop, or add courses within the registration period.
The students may or may not have prior experience using such
system. Ideally, any student can identify him/herself to the system to Register,
Add, or Drop course/courses during the registration period

2.2

Online Registration
Online Registration Systems are used in a wide range of organization.
Once implemented, the benefits are immediately seen, i.e. reduced
paperwork, more time for other tasks (tedious task become automated),
increased payment security, plus improved data organization and accuracy.
(Bargh, 2003).

2.2.1

Benefits gain from Online Registration


Automated Online Registration System plays a great role in
simplifying the job of employees at the school and satisfying the need of
students as well as other staff of the school.(Bargh, 2003).
There are a lot of benefits to derive in using computer as registration
tool. The benefit which the staffs, students and the polytechnic will gain in
using online registration includes:
Accuracy
Automation
Speed
5

Storage
Fast retrieval of data
2.3

Manual Registration
Manual registration forms are produced and prepared by school
management. Each department in the college has to provide their registration
document at the beginning of each semester and the unused ones may be may
be wasted after the registration in some cases. In some cases the form would
not be ready for the students in time even if the form is ready the students has
to join a long queue for them to collect their registration form which takes
long time.

2.4

Web Programming
World Wide Web (web) is a collection of interconnected document
and other resources, linked by hyperlinks and URLS. Web is one of the
services accessible via the internet. Tim Berners Lea director World Wide
Web Consortium (W3C) and inventor of the World Wide Web cited the
power of the web is in its universality, access by everyone regardless of
disability is an essential aspect, (Tim, 2009). Now a days web application
allows full interaction between visitor (user) and a database. User can fill up a
form and send or submit and have a feedback fattening what he entered in the
form. All this is possible with the use of dynamic web page.
World Wide Web (web) allows computer users to locate and view
multimedia-based documents on almost any subject over the internet. Though
the internet was developed decades ago, the web is a relatively recent
creation. In 1989, Tim Berners-Lee of CERN (The European organization for
nuclear research) began to develop a technology for sharing information via
hyperlinked text documents. Burners-lee called his invention the Hyper Text
Markup Language (HTML). He also wrote communication protocols to form
the backbone of his new information system, which he called the World Wide
Web. In particular, he wrote the Hypertext Transfer Protocol (HTTP) a
communication protocol used to send information over the web. Web use
exploded with the availability in 1993 of the mosaic browser, which featured
a user friendly graphical interface.
6

World Wide Web is not a particular place on the internet`, nor is it a


particular computer or something that can log into. Instead, the best way to
describe the web is as a service on the internet, using certain protocols,
computer because they are connected to the internet and run web server
software can respond to requests from client computer running web browser
software. Elizabeth et al (2010)
Dynamic web site is a website that responds and processes the user
request and displays the desired information if any. Certain module need to
work together in order to make web fully dynamic (Elizabeth et al
(2010),these modules include:
Markup language that is use to design the site.
Web server that handle the request from the client.
Scripting language, this is the programming language that processes
any type of data.
Database, that uses to store and retrieve data when needed.

2.5

AMP
AMP is an abbreviation for APACHE, My-SQL, and PHP. These are
all part of open source group of software programs. Open source movement is
a collaboration of some of the finest minds in computer programming. By
allowing open exchange of information, programmers from all over the world
contribute to make a truly powerful and efficient piece of software available
to everyone. Many applications are used in developing web application,
depending on the choice of the developer (Elizabeth et al, 2010). AMP is
among the powerful application used for many web developers because of the
following reason:
They are free. The greatest thing about open source software is that it
is free and available to the general public.
They are cross platform and Technology - neutral.
They must not restrict other software.
They embrace diversity.

The above feature of open source software is what make these


softwares popular and use by almost every programmers. In carrying out my
research project, AMP module, are the applications I am going to used.

2.5.1

Apache
The apache http server, maintained by the apache software
foundation, is currently the most popular web server because of its stability,
efficiency, portability, security and small size. It is open source software that
runs on UNIX, Linux, Mac osx, Windows and numerous other platforms.
(Elizabeth et al, 2010).
Apache acts as web server. Its main job is to parse any file requested
by a browser and display the correct results according to the code within that
file. Apache is quite powerful and can accomplish virtually any task that a
web master requires and it has the following features.(Elizabeth et al, 2010)
Password protected pages for a multitude of users.
Customized error pages
Display of code in numerous levels of html, and the capability to
determine at what level the browser can accept the content.
Usage and error logs in multiple and customizable formats.
Virtual hosting for different IP addresses mapped to the same server.
Directory Index directives to multiple files.
URL aliasing or rewriting with no fixed limit.

2.5.2

PHP
PHP is a server side scripting language that allows web site to be
truly dynamic. PHP stands for Hypertext Preprocessor (and, yes we are aware
PHP is a recursive acronym probably meant to confuse the messes). PHP
was created by Rasmus Lerdorf to track users at his website. In 1995, Lerdorf
released it as a package called the Personal Home Page Tool. Two years
later, PHP2 featured build-in database support and form handling.(Elizabeth
et al, 2010)
8

In 1997, PHP3 was released with a rewritten parser, which


substantially increased performance and led to an explosion of PHP use.
Subsequently many versions are now realized with additional capabilities. Its
flexibility and relatively small learning curve make it one of the most popular
scripting languages around. As a programming language for the web, PHP is
hard to ignore, because of the following features:
Simplicity
Portability
Speed
Open source
Extensible
XML and Database support
2.5.3

My-SQL
In 1994, a Swedish consulting firm needed a fast and flexible way to
access its tables. Unable to find a database server that could accomplish the
required task adequately, Michael Widenius, the principal developer at TCX,
decided to create his own database server. The resulting product was called
MY-SQL (pronounced my sequel), a robust and scalable relational database
management system (RDBMS).
My-SQL is a structured query language server designed for heavy
loads and processing complex queries, its also multi-user, multithreaded
RDBMS server that uses SQL to interact with and manipulate data. A few
important benefits or features include:
Scalability
Performance
Support for many programming language
Implementations of MYSQL for windows, Mac osx, Linux and
UNIX.
Handling large databases
A password and user verification system for added security

For these reasons and more, MYSQL is the database of choice for
many businesses, universities and individuals. MYSQL is also an open source
software product. (VikramVaswani, 2005).
2.5.4

HTML
This is a fundamental block of building or designing any web site, html
is the language that is use to define web page on an explorer.(Donna, 2003)
HTML stands for Hypertext Markup Language. Is a series of standard
codes and conventions designed to create pages and emphasize text for display
in programs such as those found in web browsers. Using html one can create a
web page that include formatted text and commands that cause the web
browser to load and display images or other multimedia elements on that page.
HTML is a legacy technology of the World Wide Web Consortium (W3C).
(Donna, 2003).

10

CHAPTER 3
RESEARCH METHODOLOGY
3.1

Introduction
This chapter provides an introduction to the methodology adopted and the

justification on the chosen developmental model. The different phases of the model
will be carefully analyzed; the chapter will then identifies and describes the tools
used to perform the software development processes

3.2

Methodology
According to Encarta dictionary, Methodology is defined as methods or

organizing principles underlying a particular art, science, or other area of study. In


this context, it is the art of managing and controlling resources to achieve specific
goals.
A methodology in software development is a framework that is used to
structure, plan, and control the process of developing an information system. There
are many methodologies that can be applied depending on its suitability to the
project in question . They includes; Waterfall model, V-model, Incremental model,
Rapid Application Development model, Proto type model, Spiral model, Agile
model, Iterative model etc.
For the purpose of this research work the waterfall model is chosen as the
methodology to develop the CRRS, below is a brief description on how the scope of
each phases were visited in this research work.
3.2.1

Waterfall Model
The waterfall model has the following phases of development, below is a

description on how the phases were visited.


Analysis
Design
Development
Testing

11

3.2.1.1 Analysis
This involves examining the process of the current system with aim of
developing a computerized online system that enables registration effectively and
efficiently.
Mode of Registration
The mode of registration in Hassan Usman Katsina Polytechnic is semester
while, the mode of payment is done once in a session. This registration is in two
category, payment and forms registration.
i.

Payment: All students should make payment of their fees at the designated
banks. Subsequently, the Bank teller obtained should be taken to the

Receipt

Bursary Department where it would be changed into official school receipt.


This process is illustrated in the diagram below.

Bursary
Teller

ii.

Student

Teller

Registration Forms: These are forms which is given to students to fill and
distribute to various point after validation, student must present his/her
receipt of payment and his identification card before collecting the
registration forms, these forms are:
Personal data form: This form contains student personal data
Registration form: - This form contain student academic information
Course registration forms: - This form is used by the student to list all courses
offered in a semester.

iii.

Form Validation: This is a way of checking students information in the


forms provided, to ensure correctness. This validation is taking place in these
points:

Head of Department

Academic Secretary
12

Bank

This validation involved checking the registration document of forms to


ensure that student registration is appropriate.
iv.

Form Distribution: After the forms have been validated, student should
distribute the forms to various points, which include: -

Registry Office

Academic Office

Department
The first copy should go to the academic office where the registration

documents are kept, the second copy would be taken to the department where
student belong to, the third copy would be taken to registry office and the last
copy should be kept by the student. All this distribution is done with the aim of
keeping record for future reference.
The data flow process can be depicted by the diagram below:

Student

Registry

Forms

Forms

Academic

Forms

Student record

Student record
Department

Student record

3.2.1.2 Target Population


The sample populations for the study are students and registry office
personnel from Hassan Usman Katsina Polytechnic, Katsina State. The
random sampling method was used to select the samples. The technique will
afford the students as well as registry personnel equal chance to be selected
for the study.
13

3.2.1.3 Instrument for Data Collection


The techniques and instruments in data collection include:
Questionnaire, Observation and Interview.
When carrying out this study, the use of observation and interview
was employed.
3.2.1.4 Observation
In this approach, data are attractive as they afford the researcher the
opportunity to gather Live data from Live situations. It involves watching
people, events etc, as they occur, it is a situation-based.
3.2.1.5 Interview
This is the most common or frequently used method of data
collection; it involves asking questions and getting answers from participants
in a study. Interviewing has a variety of forms including: individual, face-toface interviews and face-to-face group interviewing. The asking and
answering of questions can be mediated by the telephone or other electronic
devices (e.g. computers). Interviews can be structured, semi-structure or
unstructured.
An interview is a direct face-to-face attempt to obtain reliable and
valid measures in the form of verbal responses from one or more respondents.
It is a conversation in which the roles of the interviewer and the respondent
change continually.

3.2.1.6 Validation and Reliability of the Instrument


The observation procedure helps to watch and describe behavior the
way it occurs in the natural setting, also the method helps in recording what
actually happened rather than peoples opinion.
Similarly, answers from the interviewees are to provide data and
information for testing research hypothesis. The major advantage is that it
allows more opportunity to assess the respondents understanding and
interpretation of the questions and to clarify any confusion that arises about
the meaning of the questions or the response. It also allows the opportunity to
14

present material to respondents and obtain their reactions. For example, faceto-face interviews have been used to assess the meaning that non-literate
subjects attach to symbols. Where less is known about the way in which
respondents think about an issue or about the range of possible answers to
questions, structured interviews create the opportunity for interviewers to ask
supplementary questions, when needed to obtain adequate answers.
3.2.2

Design
This is concerned with the procedures or methods used to transform
the current manual system of registration process to a computerized online
system, that allow an authorized student to accomplish some of the basic
processes discussed above.
Online software design is an ad-hoc process starting from a set of
users requirement, through an informal design up to the coding and
compilation stage. The designed system is then modified to suit user
requirements as the system is implemented.
Since the aim of this research work is to design an online student
registration, there are some parts that will still left manually. These parts are
payment of registration fees and validation of total credit registered. This is
because of the variation exist between level, department and college.
Input Design
Input design specified the manner in which input enters the system for
processing. It ensure the reliability of the system and production of result to
erroneous information, it determines whether the user of the system interacts
with the system efficiently. Input are linked to database for storing the data.
The forms are designed with an attribute of the form, combo box, for a drop
down list, text linked to database for viewing, commend button are function
to be carried out to perform a task such as add, read, delete, update.
Page/Forms
All the registration forms listed above are design electronically, using
the Hypertext Markup Language (HTML) as stated in the previous chapter

15

and there are additional forms and some static page that provides information
about the college to visitor.
The computerized system has the following web pages:
i.

Index Page: This is the home page of the software, it serves as a gate man
that gives authorized user access to the private resources of the system and
denied access to unauthorized person. This authentication is achieved by
presenting user identity (user name & password).
Homepage is design to have some text and image link that allow the visitor to
navigate through some page that are not private.

ii.

Pin account Page: Pin account page is used by the new students to get
access to the system.

iii.

Create account page: This page allow the new user to create his account,
which can be used to login to the system when ever he/she wish to do so.

iv.

Personal data page: This is the personal data form, where user will enter his
personal data.

v.

Registration page: This page contains students academic information.

vi.

Course registration page: This is where student will enter his first semester
course.

vii.

Course registration page 2: This is where student will enter his second
semester course.

iix.

Admin login form: This form is used by the admin to login to the
system.

ix.

Insert pin form: This is the form that is used by administrator to store pin in
to a database.
All these pages have an associated PHP code that will processes and
validate the data it contains.
Beside these pages, there are also some static pages that give visitor
information about the college. The pages are:
Contact page: This page contains the college address.
About us: This page contains brief history of the college.
Registration page: This is where visitor can get information about registration
News Page: This page contains the college news.
Admission page: This page contains admission lists.
16

Programme page: This page contains list of Programme offered at the college.
Principal Officers: This contains names of principal officers of the college.
Board page: This page contain list of board members of the college.
Feedback page: This page allows users to send feed back to the school.
Output Design
The output design that can be generated from the system, this depend on
the type of information needed to be extracted from the record gathered such as
report on the number of student registered with absolute accuracy. The output is
designed in such a way that user receives understandable information that is used
for decision making. The user must be able to easy find the output, move forward
and backward and exit the report and the timing of computer outputs information
must reach the user to another transaction or decision.
Database Design
A database is an organized collection of data. There are many different
strategies for organizing data to facilitate easy access and manipulation. This is
where all the information will be kept. It contains a number of tables each with
different information. These tables include:
i.

Pin table: This table contains a list of pin number and corresponding serial

ii.
iii.
iv.
v.
vi.
vii.
viii.

number, which can be used to validate user serial and pin number input.
Account table: This table contains account of existing user
Admin table: This table contains account of the administrators.
Personal data table: This table store validated user personal data.
Registration table: This store validated input from registration form.
Course table: This table store validated data from first semester form
Course2 table: This table store validated data from second semester form
Feedback table: This table store validated input from feedback form

17

3.2.3

Development

3.2.3.1 Technical Tools used for the Research


In this research work the technical tools used are DATABASE,
HYPERTEXT PREPROCESSOR (PHP) and MySQL as the server-side
technology, PHP for the server scripting language and MySQL for the
database. For the client-side HTML will be used.

Hypertext Preprocessor (PHP): is a server-side language that allows your


website to be fully dynamic. Its simplicity and ease of use make it one of the
most popular scripting languages around the globe. PHPs popularity
continuous to increase as business, and every where embrace it as an

alternative to Microsofts ASP language.


MySQL:is the database constructed to enable PHP and Apache to work
together to access and display data in a readable format to a browser. It is a
structure query language (SQL) server designed for processing complex
queries. As a relational database system, MySQL allows many different tables
from a particular database to be joined together for maximum speed and

efficiency. MySQL is a perfect choice for providing data through the internet.
HTML:-Is a language editor for designing, coding and developing web
pages, websites, and web applications.

3.2.3.2 Justification of the above tools

Hypertext Preprocessor (PHP)


It is fast and easy:-PHP is as fast as anything out there PHP offers you the

best opportunity to develop powerful web application quickly.


It is cross-platform:-PHP runs on windows 2000/XP/NT/CE/

AND UNIX and with both apache and IIS.


It accesses everything:-PHP has a built-in set of functions

that make getting whatever you need in a simpler way.


It is open source.

MySQL
Its quick and powerful:-For small to medium sized databases, MySQL is
very fast. If you are creating a moderately sized commerce or
educational site. MySQL has all

the power you need.

18

It is improving all the time:-MySQL is improving at a faster rate. The


developers

release updates concurrently and is adding impressive features

all the time.


It is cost effective:-MySQL is free for development and can be used in a live
production environment for a minimal cost.
It is easy.
HTML
It is the predominant mark-up language for web pages
It support more scripting language

3.2.1.4 Testing
This involves testing the whole system to ensure proper operation. Testing
newly developed system is necessary to ensure:
Proper function of the whole system.
That the system meets the users needs.
That the system achieves the stated objective.
That the system reacts with the user input and process it accordingly.
Proper storage of validated user input.
That the desired output is display to the user.
The newly design system was tested several time using internet explorer, and
found all the components are working properly.
3.2.4

Justification for chosen the Model (Waterfall)

1.

This model is simple and easy to understand and use

2.

It is easy to manage due to the rigidity of the model each phase has specific
deliverables and a review process.

3.

In this model phases are processed and completed one at a time,phase do not
overlap.

4.

Waterfall model works well for smaller projects where requirements are very
well understood.
CHAPTER 4

RESULTS AND DISCUSSION

19

4.1

Introduction
This chapter provides the findings of the research work. It begins with
architectural design of the new system, user interfaces design comprising
both input and output of the new system, database design of the new system
and problem encountered in developing the new system. The chapter ends
after a brief description on how the set objectives were achieved.

4.2

Design of the New System


This is the most crucial phase in the development of the system.
The section deals with setting up of the system and the operation
instruction on how to effectively use the system. The emphasis of system
design is to develop a new system that help to achieved the desired goal and
objectives of the organization and to overcome some of the short coming of
the existing system. If the problem is minor, only little modification is
required. On the other hand, if its minor problem, a major change need to be
required.
Home page: This is the page that contains information about the college,
it allows existing user to login to system, it also provide link to create
account page page that allow new user to create new account. The code
for home page is in appendix B. You can login to the system, by typing
the web address in the address bar of your browser. After the page has
been display the user would enter his user name and password, in the
space provided and then submits the form which is process by the PHP
code. The process for validating login information can be depicted by the
flowchart below:

20

Start

User Name & Password

PHP Code

Valid

No

Yes

Registration forms

Stop

Fig. 4.2, Login Validation Flowchart

21

Pin account page: This page accepts users pin and serial number and
checks the existence and the status of the pin before granting access to the
open account page.
Open account page: This is the page where new user will create his
account. This page can be access from home page; if the account is
successfully created then user will have access to the registration forms.
The code for this page is also in appendix B.
Personal data page: this page was design to accept user personal
information and send to the PHP code for processing. The HTML and
associated PHP code for this page is in appendix page B.
Registration page: this is the page that contains a form named registration
form. Is a form that accepts user academic information and send to the
associated PHP code for processing. PHP code accepts the data send to it
and test it to ensure the values of each field are correct, before storing to
the database.
Course registration pages: These forms are used by the user to pass the
courses registered in a semester to the PHP code for validation. If the
information is valid, then the information will be stored in a database.
All the HTML and PHP code for the above pages are in shown in the
appendix.
The flowchart below illustrates how the data/ would be validated
before storing into the database.

22

Start

User information

PHP file

Valid

No

Yes

Database

Stop

23

Fig. 4.2.1,Data Validation FlowchartAfter the system is set


for use, there is need to train the administrator on how to work with the system to
ensure proper operation.

4.2.1

Input interface of the new system


Students Personal Data Page:Thispageallow user to input his/her personal
information, such as date of birth, place of birth, home town etc.

Registration Data Form: This page allowsuser to input his/her registrations


details such as; Admission Number, Session, Entry Qualification (WAEC,
NABTEB etc)

24

First Semester Course Registration Form: This page allow user to register
courses to be offered for the first semester.

Second Semester Course Registration Form: This page allow user to


register courses to be offered for the second semester.

25

4.2.2

Database and output of the new system


Personal Data Table: This table holds the personal details of user input
through personal data page

Registration Form Table: This table holds the users registration details

Course Registration Table 1 and 2: This table holds the courses registered
by users for the first and second semester

26

Open Account Table: This table stores the registered accounts for
subsequent logins.

Pin Table: This table stores pin and their serial numbers created by the
admin, the students used the pin and serial number to register with the
polytechnic.

Admin Table: This holds the Administrator login details

4.3

System Requirements
These are set of tools needed by the system to operate, as it is
designed. The proper operation of the newly design system depend on these
requirement. These requirements are in two class, hardware and software
requirement.

27

i.

Hardware Requirement: This is the physical component needed by the


system to operate. Online registration portal require high-end hardware to
manage multiple processing. Online registration portal require a minimum of:
Pentium Three Processor
256MB of RAM
80GB of Storage

ii.

Software Requirement: This is the nonphysical component needed by the


system to operate. Online registration portal require the following software:
Network operating system
Web browser

4.4

The achieved objectives of the system


The following are objectives achieved after the new system has been
designed and implemented.
1. The system enable student to register with the polytechnic online,
irrespective of where theyare located.
2. Central database has been created that interacts with student during the
registration.
3. Readymade online registration form has been designed.
4. Tedious work by staff during registration exercise has been eliminated.
5. The system provide easier quick search for students record

28

CHAPTER 5

SUMMARY, CONCLUSION AND RECOMMENDATION

5.1

Summary
The aim of this research project is to develop online registration portal
that enable student to register online. This was done by taking Hassan Usman
Katsina Polytechnic into consideration.
Online registration portal was developed after reviewing and
analyzing the existing manual system at the investigation stage and dataflow
diagrams to determine the requirements of the system.
The design was implemented using HTML, PHP and MYSQL, for the
database files. The web site starts with the home page, followed by creating
account page for new user, then registration forms. The home page has some
links that allow navigation to various pages.
The chapters give briefs of how the design was carried out, the
structure program and the content of the sites.

5.2

Conclusion
In conclusion, the projects aim was achieved, which was design and
implementation of online registration portal. The program was tested and it
achieves the desired objectives. The application interface was made user
friendly in such away that even a novice computer user will not have
difficulty in using the application.

5.3

Recommendation
For the effective usage of this site and to have a good management of
the system, it is necessary to train the staff on how to work with the
application system. And also constant maintenance and modification is
needed whenever the need arises.

29

REFERENCES
Elizabeth N., Jason G., Yann Le S, Jeremey S, Michael K (2010) Beginning PHP5,
Apache, and MYSQL Web Development Retrieved 09/2015 from
www.wrox.com/WilleyCDA/WroxTitle/Beginning-PHP5-Apache-andMySQL-Web-Development.productCd-0764579665.html
Bargh J.D (2003, May, 07), Consequence of Online Systems in High Institution of
Learning Retrieved from
www.projectabstract.com/en/consequence_of_online_design.html
Donna L. Baker (2003), HTML Complete Course, Retrieved 02, 2015 from
www.homeandlearn.co.uk/WD/WebDesign.html
Elizabeth Castro (2006), HTML, XHTML and CSS, 6th Edition, Retrieved 02, 2015
from www.homeandlearn.co.uk/WD/HTML-XHTML_CSs.html
Heard M, Cook Paul and Paker U, Arnett Johnson and Posey W, Lonabocker White
and Long Yung, Lisker (1987), Stages of Online Registration System
Development, Retrieved 08, 2011 from
www.computerhope.com/online_registration-development/review
Michael, Chapman and Gambrell, Brown, Hengehold and Kim (1979), Stages of
Online Registration System Development, Retrieved 08, 2011 from
www.computerhope.com/online_registration-development/
Welback, P. (2008, August, 09), Design of Students Online Management Systems
Retrieved 4, 2010 from www.ajman.ac.ae/
Tim BernersLea (2009), Introducing Web Programming Retrieved 02, 2015
from www.w3schools.com/web_programming-tut/default.asp
Tim BernersLea (2009), JavaScript and HTML DOM Reference Retrieved 02, 2015
from www.w3schools.com/jsref/default.asp
VikramVaswani (2005), How to do everything with PHP & MySQL Retrieved 12,
2014 from www.everythingphpmysql.com/preview
vonBlackenburg,(2006, August, 07), Online Registration Services Retrieved 12,
2015 from www.easydev.com/onlineregistration/guide

30

APPENDIX
Home Page
<?php require_once('Connections/portalDB.php'); ?>
<?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
}
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}
if (isset($_POST['user_name'])) {
$loginUsername=$_POST['user_name'];
$password=$_POST['password'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "mainpage.php";
$MM_redirectLoginFailed = "index.php";
$MM_redirecttoReferrer = false;
mysql_select_db($database_portalDB, $portalDB);
$LoginRS__query=sprintf("SELECT user_name, password FROM
openaccount WHERE user_name='%s' AND password='%s'",
get_magic_quotes_gpc() ? $loginUsername :
addslashes($loginUsername), get_magic_quotes_gpc() ? $password
: addslashes($password));
$LoginRS = mysql_query($LoginRS__query, $portalDB) or
die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;
if (isset($_SESSION['PrevUrl']) && false) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

31

<head>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<title>Welcome | Hassan Usman Katsina Polytechnic</title>
<link rel="icon" type="image/ico" href="images/fav.jpg"/>
<link href="themes/5/js-image-slider.css" rel="stylesheet"
type="text/css" />
<script src="themes/5/js-image-slider.js"
type="text/javascript"></script>
<link href="generic.css" rel="stylesheet"
type="text/css" />
<link rel="stylesheet" type="text/css" media="all"
href="jsDatePick_ltr.min.css" />
<script type="text/javascript"
src="jsDatePick.min.1.3.js"></script>
<link rel="stylesheet" type="text/css"
href="xres/css/style.css" />
<script src="js/jquery.ui.totop.js"></script>
<!--[if IE 6]><style type="text/css"> * html img { behavior:
url("xres/iepngfix.htc") }</style><![endif]-->
<script type="text/javascript"
src="xres/js/saslideshow.js"></script>
<script type="text/javascript"
src="xres/js/slideshow.js"></script>
<script src="js/jquery-1.5.min.js" type="text/javascript"
charset="utf-8"></script>
<script src="vallenato/vallenato.js" type="text/javascript"
charset="utf-8"></script>
<link rel="stylesheet" href="vallenato/vallenato.css"
type="text/css" media="screen" charset="utf-8">
<script type="text/javascript">
$("#slideshow > div:gt(0)").hide();
setInterval(function() {
$('#slideshow > div:first')
.fadeOut(1000)
.next()
.fadeIn(1000)
.end()
.appendTo('#slideshow');
}, 3000);
</script>
</head>
<link rel="stylesheet" type="text/css" href="style.css" />
<body>
<div class="container">
<div class="header"><img src="images/logo.png" width="140"
style="margin-top:6px; margin-left:10px;" height="145px;" />
<div class="orgname" ><a style="text-decoration:none"
href="index.php?Result&pag"><h1>HASSAN USMAN KATSINA
POLYTECHNIC</h1></a>

32

<div class="slogan"><h3>Success Through Labour....</h3></div>


</div>
<div class="menu">
<center>
<ul>
<li><a href="index.php?pag=1&Result">|Home|</a></li>
<li><a id="current" href="SCHOOL.HTML">|Colleges|</a>
</li>
<li><a id="current" href="#">|Downloads|</a>

</li>

<li><a id="current" href="ABOUT.HTML">|About Us|</a>


</li>
<li><a id="current" href="CONTACT.HTML">|Contact Us|</a>
</li>
<li><a id="current" href="feedback.php?Result&msg">|
Feedback Us|</a> </li>
</ul></center>
</div>
<!-- end .header --></div>
<div class="footer">
<table width="200" border="0" class="ftab3">
<th> User Login</th>
<tr><td>
<table width="100%" border="0" cellspacing="0"
cellpadding="0">
<td width="153" height="187" valign="top"
background="images/2c.jpg">
<form method="POST" action="<?php echo
$loginFormAction; ?>">
<p class="bod">
&nbsp;&nbsp;
&nbsp;<img src="images/arrowsm.gif" width="4" height="5"
align="absmiddle">
&nbsp;<span class="sub">USER NAME</span>
<br>
&nbsp;&nbsp; &nbsp;
<input name="user_name" type="text"
size="12" maxlength="20">
<br>

33

&nbsp;&nbsp;&nbsp;&nbsp;<img
src="images/arrowsm.gif" width="4" height="5"
align="absmiddle">
&nbsp;<span class="sub">PASSWORD<br>
&nbsp;&nbsp;&nbsp;&nbsp;
<input name="password" type="password"
size="12" maxlength="15">
<br>
<br>
&nbsp;&nbsp;&nbsp;
<input type="checkbox" name="checkbox"
value="checkbox">

</span> remember me<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input name="submit" type="submit"
value="submit">

</form></td>
</tr>
</table>
<p>&nbsp;&nbsp; &nbsp;<div align="center"><h3>For
new User <a href="pinaccount.php"><br /><font color=red>click
here</font></h3></a></div>
</td></tr>
</table>
<table>
<tr>
<div id="content">
<div id="rotator">
<ul>
<li class="show"><img
src="xres/images/jb2/01.jpg" width="800" height="379"
alt="" /></li>
<li><img src="xres/images/jb2/02.jpg"
width="800" height="379" alt="" /></li>
<li><img src="xres/images/jb2/03.jpg"
width="800" height="379" alt="" /></li>
<li><img
src="xres/images/jb2/04.jpg" width="800" height="379"
alt="" /></li>
<li><img
src="xres/images/jb2/05.jpg" width="800" height="379"
alt="" /></li>
</div>
</table>

</ul>

</tr>

34

<div class="sidebar1">
<div class="side">
<h3>Navigation</h3>
<ul class="nav">
<li><a href="NEWS.HTML">News</a></li>
<li><a href="my.php">Admission</a></li>
<li><a href="PROGRAMME.HTML">Programme</a></li>
<li><a href="adminlogin.php">Admin Login</a></li>
<li><a href="BOARD.HTML">Boards</a></li>
<li><a href="CONTACT.HTML">Contacts</a></li>
</ul>
</div>
<br />
<h3>Downloads</h3>
<ul class="nav">
<li><a href="2014 admission.docx">2014/2015 Admission
List</a></li>
<li><a href="academic calendar.docx">New Academic
Calender</a></li>
<li><a
href="guidelines_for_new_students.docx">Guidelines for the New
Student</a></li>
<li><a href="hostel_form.pdf">Hostel Application Form
Download </a></li>
</ul>
</div>

<div class="content">
<table>
<tr><td><font> <font color="red">Rector's
Message:</font><br> As you begin your journey to attain
tertiary education, welcome
you to Hassan Usman Katsina
Polytechnic, a citadel of learning on the edge of Sahara, in a
city known for its tradition and thirst for knowledge over the
centuries. Your choice of this Polytechnic in the country must
have been informed by not mere sentiments of being citizens of
Nigeria and Katsina State, but a common belief that the
Polytechnic will offer you all that is required to attain your
goals of knowledge, character and learning.
Polytechnic Education, unlike any other form of education is
not mainly about classroom or laboratory instruction. It is an
educating process based on individuality. You determine what
you want to learn, how you want to learn it and at what time
to learn it.
</font>
</td>
<td><img src="hacker.jpg" width="300" height="300"
alt=""></img></td>

35

</tr>
</table>
</p>
<hr />
<div>
</div>
<hr />
<div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3 style="color: #FFFFFF; font-style: italic; font-family:
'monotype Corsiva'; width: 113px; background: #009900; fontsize: 20px; padding:0px; ">Follows us on</h3>
<table width="200" style="margin:0px; padding:0px;">
<tr>
<td><a href="#"> <img src="images/facebook.png" /></a></td>
<td><a href="#"> <img src="images/twitter.png" /></a></td>
</tr>
</table>
</div>

<!-- end .content --></div>


<div class="footer">
<div class="footerlink">

</div>
<hr />
<div style="background:#000000; height:60px; margin-bottom:10px; margin-top:-7px;">
<p>Copyright&copy;2014 - Hassan Usman Katsina
Polytechnic. All rights reserved</p>
<p><font color=red size=3> Designed by:
</font> <a href="www.facebook.com/isya.isyaku1"><font
color=white size=3> Isya Isyaku aka Hackermlf</font></a>
<!-- end .footer --></div>
<!-- end .container --></div>
</body>
</html>

Admin Login Page


36

<?php require_once('Connections/portalDB.php'); ?>


<?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
}
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}
if (isset($_POST['user_name'])) {
$loginUsername=$_POST['user_name'];
$password=$_POST['password'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "insertpin.php";
$MM_redirectLoginFailed = "#";
$MM_redirecttoReferrer = false;
mysql_select_db($database_portalDB, $portalDB);
$LoginRS__query=sprintf("SELECT user_name, password FROM
admin WHERE user_name='%s' AND password='%s'",
get_magic_quotes_gpc() ? $loginUsername :
addslashes($loginUsername), get_magic_quotes_gpc() ? $password
: addslashes($password));
$LoginRS = mysql_query($LoginRS__query, $portalDB) or
die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;
if (isset($_SESSION['PrevUrl']) && false) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<title>Welcome | Hassan Usman Katsina Polytechnic</title>
<link rel="icon" type="image/ico" href="images/favicon.ico"/>

37

<script type="text/javascript"
src="jsDatePick.min.1.3.js"></script>
</head>
<link rel="stylesheet" type="text/css" href="style.css" />
<body>
<div class="container">
<div class="header"><img src="images/logo.jpg" width="140"
style="margin-top:6px; margin-left:10px;" height="145px;" />
<div class="orgname" ><a style="text-decoration:none"
href="index.php?Result&pag"><h1>HASSAN USMAN KATSINA
POLYTECHNIC</h1></a>
<div class="slogan"><h3>Success Through Labour....</h3></div>
</div>
<div class="menu">
<ul>
<li><a href="index.php?pag=1&Result">|Home|</a></li>
<li><a id="current" href="SCHOOL.HTML">|Colleges|</a>
</li>
<li><a id="current" href="readmore.php?pag=6&Result">|
Webmail|</a>
</li>
<li><a id="current" href="#">|Downloads|</a>

</li>

<li><a id="current" href="ABOUT.HTML">|About Us|</a>


</li>
<li><a id="current" href="CONTACT.HTML">|Contact Us|</a>
</li>
<li><a id="current" href="feedback.php?Result&msg">|
Feedback Us|</a> </li>
</ul>
</div>
<!-- end .header --></div>
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;
charset=iso-8859-1">
</HEAD>
<FORM METHOD="POST" NAME="ADMIN"METHOD= "POST" ACTION="<?php
echo $loginFormAction; ?>">
<p>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

38

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<CENTER>
<STRONG>
<H1>ADMIN LOGIN.</H1>
</STRONG>
</CENTER>
<BR>
<TABLE ALIGN="CENTER">
<TR>
<TD ALIGN=RIGHT WIDTH=280>USER NAME:</TD>
<TD ALIGN=LEFT WIDTH=500><INPUT TYPE="TEXT"
NAME="user_name" SIZE="20" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=280>PASSWORD:</TD>
<TD ALIGN=LEFT WIDTH=500><INPUT TYPE="PASSWORD"
NAME="password" SIZE="20" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=280><input name="submit"
type="submit" value="submit" /></TD>

39

<TD ALIGN=LEFT WIDTH=500><input name="reset"


type="reset" value="clear" /></TD>
</TR>
</CENTER>
</TABLE>
</FONT>
<!-- PAGE BODY GOES HERE -->
</TD>
</TR>
</TABLE>
</form>
<p>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;

40

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
</BODY>
</HTML>
First Semester Course Registration Page
<?php require_once('Connections/portalDB.php'); ?>
<?php
if (!isset($_SESSION)) {
session_start();
}
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";
// *** Restrict Access To Page: Grant or deny access to this
page
function isAuthorized($strUsers, $strGroups, $UserName,
$UserGroup) {
// For security, start by assuming the visitor is NOT
authorized.
$isValid = False;
// When a visitor has logged into this site, the Session
variable MM_Username set equal to their username.
// Therefore, we know that a user is NOT logged in if that
Session variable is blank.
if (!empty($UserName)) {
// Besides being logged in, you may restrict access to
only certain users based on an ID established when they login.
// Parse the strings into arrays.
$arrUsers = Explode(",", $strUsers);
$arrGroups = Explode(",", $strGroups);
if (in_array($UserName, $arrUsers)) {
$isValid = true;
}
// Or, you may restrict access to only certain users based
on their username.
if (in_array($UserGroup, $arrGroups)) {
$isValid = true;
}
if (($strUsers == "") && true) {
$isValid = true;
}

41

}
return $isValid;
}
$MM_restrictGoTo = "index.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",
$MM_authorizedUsers, $_SESSION['MM_Username'],
$_SESSION['MM_UserGroup'])))) {
$MM_qsChar = "?";
$MM_referrer = $_SERVER['PHP_SELF'];
if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0)
$MM_referrer .= "?" . $QUERY_STRING;
$MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar .
"accesscheck=" . urlencode($MM_referrer);
header("Location: ". $MM_restrictGoTo);
exit;
}
?>
<?php
function GetSQLValueString($theValue, $theType,
$theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ?
addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue
"NULL";
break;
case "long":
case "int":
$theValue = ($theValue
"NULL";
break;
case "double":
$theValue = ($theValue
doubleval($theValue) . "'" :
break;
case "date":
$theValue = ($theValue
"NULL";
break;
case "defined":
$theValue = ($theValue
$theNotDefinedValue;
break;
}
return $theValue;
}

!= "") ? "'" . $theValue . "'" :

!= "") ? intval($theValue) :

!= "") ? "'" .
"NULL";
!= "") ? "'" . $theValue . "'" :

!= "") ? $theDefinedValue :

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" .
htmlentities($_SERVER['QUERY_STRING']);

42

}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] ==
"form1")) {
$insertSQL = sprintf("INSERT INTO course (reg_no, school,
course, `level`, `session`, semester, texta1, texta2, texta3,
textb1, textb2, textb3, textc1, textc2, textc3, textd1,
textd2, textd3, texte1, texte2, texte3, textf1, textf2,
textf3, textg1, textg2, textg3, texth1, texth2, texth3,
texti1, texti2, texti3, textj1, textj2, textj3, textk1,
textk2, textk3, textl1, textl2, textl3, textm1, textm2,
textm3, textn1, textn2, textn3, texto1, texto2, texto3,
textp1, textp2, textp3, total) VALUES (%s, %s, %s, %s, %s, %s,
%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s,
%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s,
%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s,
%s, %s, %s, %s)",
GetSQLValueString($_POST['reg_no'],
"text"),
GetSQLValueString($_POST['school'],
"text"),
GetSQLValueString($_POST['course'],
"text"),
GetSQLValueString($_POST['level'],
"text"),
GetSQLValueString($_POST['session'],
"text"),
GetSQLValueString($_POST['semester'],
"text"),
GetSQLValueString($_POST['texta1'],
"text"),
GetSQLValueString($_POST['texta2'],
"text"),
GetSQLValueString($_POST['texta3'],
"int"),
GetSQLValueString($_POST['textb1'],
"text"),
GetSQLValueString($_POST['textb2'],
"text"),
GetSQLValueString($_POST['textb3'],
"int"),
GetSQLValueString($_POST['textc1'],
"text"),
GetSQLValueString($_POST['textc2'],
"text"),
GetSQLValueString($_POST['textc3'],
"int"),
GetSQLValueString($_POST['textd1'],
"text"),
GetSQLValueString($_POST['textd2'],
"text"),
GetSQLValueString($_POST['textd3'],
"int"),
GetSQLValueString($_POST['texte1'],
"text"),

43

"text"),
"int"),
"text"),
"text"),
"int"),
"text"),
"text"),
"int"),
"text"),
"text"),
"int"),
"text"),
"text"),
"int"),
"text"),
"text"),
"int"),
"text"),
"text"),
"int"),
"text"),
"text"),
"int"),
"text"),
"text"),
"int"),
"text"),
"text"),

GetSQLValueString($_POST['texte2'],
GetSQLValueString($_POST['texte3'],
GetSQLValueString($_POST['textf1'],
GetSQLValueString($_POST['textf2'],
GetSQLValueString($_POST['textf3'],
GetSQLValueString($_POST['textg1'],
GetSQLValueString($_POST['textg2'],
GetSQLValueString($_POST['textg3'],
GetSQLValueString($_POST['texth1'],
GetSQLValueString($_POST['texth2'],
GetSQLValueString($_POST['texth3'],
GetSQLValueString($_POST['texti1'],
GetSQLValueString($_POST['texti2'],
GetSQLValueString($_POST['texti3'],
GetSQLValueString($_POST['textj1'],
GetSQLValueString($_POST['textj2'],
GetSQLValueString($_POST['textj3'],
GetSQLValueString($_POST['textk1'],
GetSQLValueString($_POST['textk2'],
GetSQLValueString($_POST['textk3'],
GetSQLValueString($_POST['textl1'],
GetSQLValueString($_POST['textl2'],
GetSQLValueString($_POST['textl3'],
GetSQLValueString($_POST['textm1'],
GetSQLValueString($_POST['textm2'],
GetSQLValueString($_POST['textm3'],
GetSQLValueString($_POST['textn1'],
GetSQLValueString($_POST['textn2'],

44

"int"),
"text"),
"text"),
"int"),
"text"),
"text"),
"int"),
"int"));

GetSQLValueString($_POST['textn3'],
GetSQLValueString($_POST['texto1'],
GetSQLValueString($_POST['texto2'],
GetSQLValueString($_POST['texto3'],
GetSQLValueString($_POST['textp1'],
GetSQLValueString($_POST['textp2'],
GetSQLValueString($_POST['textp3'],
GetSQLValueString($_POST['total'],

mysql_select_db($database_portalDB, $portalDB);
$Result1 = mysql_query($insertSQL, $portalDB) or
die(mysql_error());
$insertGoTo = "course2.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));

}
?><HTML>
<HEAD>
<TITLE>COURSE1</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;
charset=windows-1251">
</HEAD>
<BODY LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0
bgcolor="green">
<script id=clientEventHandlersVBS language=vbscript>
<!-DIM MM
Sub texta1_onchange
if form2.texta1.value="EDU111" then
form2.texta2.value="HISTORY OF EDUCATION IN NIG"
form2.texta3.value="1"
ElseIf form2.texta1.value="EDU112" Then
form2.texta2.value="EDUCATIONAL/CHILD PSYCHOLOGY"
form2.texta3.value="1"
ElseIf form2.texta1.value="EDU113" Then
form2.texta2.value="PRINCIPLES & METHOD OF TEACHIG"
form2.texta3.value="1"

45

ElseIf form2.texta1.value="EDU114" Then


form2.text1a.value="PREPRIMARY AND PRIMARY STUDIES"
form2.text1b.value="1"
ElseIf form2.texta1.value="GSE101" Then
form2.texta2.value="GENERAL ENGLISH"
form2.texta3.value="0"
ElseIf form2.texta1.value="GSE113" Then
form2.texta2.value="HEALTH LIVING"
form2.texta3.value="1"
ElseIf form2.texta1.value="GSE110" Then
form2.texta2.value="LIBRARY STUDIES"
form2.texta3.value="1"
ElseIf form2.texta1.value="TED111" Then
form2.texta2.value="INTRODUCTION TO METAL WORK"
form2.texta3.value="1"
else
msgbox("invalid course")
end if
End Sub
Sub textb1_onchange
if form2.textb1.value="EDU111" then
form2.textb2.value="HISTORY OF EDUCATION IN NIG"
form2.textb3.value="1"
ElseIf form2.textb1.value="EDU112" Then
form2.textb2.value="EDUCATIONAL/CHILD PSYCHOLOGY"
form2.textb3.value="1"
ElseIf form2.textb1.value="EDU113" Then
form2.textb2.value="PRINCIPALS & METHOD OF TEACHING"
form2.textb3.value="1"
ElseIf form2.texb1.value="EDU114" Then
form2.textb2.value="PREPRIMARY AND PRIMARY STUDIES"
form2.textb3.value="1"
ElseIf form2.textb1.value="GSE101" Then
form2.textb2.value="GENERAL ENGLISH"
form2.textb3.value="0"
ElseIf form2.textb1.value="GSE113" Then
form2.textb2.value="HEALTH LIVING"
form2.textb3.value="1"
ElseIf form2.textb1.value="GSE110" Then
form2.textb2.value="LIBRARY STUDIES"
form2.textb3.value="1"

46

ElseIf form2.textb1.value="TED111" Then


form2.textb2.value="INTRODUCTION TO METAL WORK"
form2.textb3.value="1"
else
msgbox("invalid course")
end if
End Sub
Sub textc1_onchange
if form2.textc1.value="EDU111" then
form2.textc2.value="HISTORY OF EDUCATION IN NIG"
form2.textc3.value="1"
ElseIf form2.textc1.value="EDU112" Then
form2.textc2.value="EDUCATIONAL/CHILD PSYCHOLOGY"
form2.textc3.value="1"
ElseIf form2.textc1.value="EDU113" Then
form2.textc2.value="PRINCIPALS & METHOD OF TEACHING"
form2.textc3.value="1"
ElseIf form2.texc1.value="EDU114" Then
form2.textc2.value="PREPRIMARY AND PRIMARY STUDIES"
form2.textc3.value="1"
ElseIf form2.textc1.value="GSE101" Then
form2.textc2.value="GENERAL ENGLISH"
form2.textc3.value="0"
ElseIf form2.textc1.value="GSE113" Then
form2.textc2.value="HEALTH LIVING"
form2.textc3.value="1"
ElseIf form2.textc1.value="GSE110" Then
form2.textc2.value="LIBRARY STUDIES"
form2.textc3.value="1"
ElseIf form2.textc1.value="TED111" Then
form2.textc2.value="INTRODUCTION TO METAL WORK"
for21.textc3.value="1"
else
msgbox("invalid course")
end if
End Sub
MM = form1.texta3.text + form1.textb3.text + form1.textc3.text
+ form1.textd3.text + form1.texte3.text + form1.textf3.text +
form1.textg3.text + form1.texth3.text + form1.texti3.text +
form1.textj3.text + form1.textk3.text + form1.textl3.text +
form1.textm3.text + form1.textn3.text + form1.texto3.text +
form1.textp3.text

47

form1.texttotal.value = MM
-->
</script>

<FORM NAME="form2" method="POST" action="<?php echo


$editFormAction; ?>" >
<table width="100%" height="100%"><tr><td align="center"
valign="top"><br>
<TABLE WIDTH=779 BORDER=0 CELLPADDING=0 CELLSPACING=0
bgcolor="#e6e2e0">
<TR>
<TD WIDTH=100 HEIGHT=150>
<IMG SRC="images/logo.png" WIDTH=150
HEIGHT=150 ALT=""></TD>
<TD ALIGN=CENTER WIDTH=679 HEIGHT=150>
<H2><font size=5 color=green>HASSAN USMAN
KATSINA POLYTECHNIC </font></H2><BR />
<H3>P.M.B 2052,KATSINA</H3><BR />
<H2><U>COURSE REGISTRATION FORM</U></H2>
</TR>
<TR>

<TD WIDTH=799 HEIGHT=13 COLSPAN=3>


<IMG SRC="images/004r_07.gif" WIDTH=885
HEIGHT=13 ALT=""></TD>
</TR>
<TR>
<TD WIDTH=799 HEIGHT=29 COLSPAN=3>
<MARQUEE>MAKE SURE YOU ENTER CORRECT COURSE
CODE IN CAPITAL</MARQUEE></TD>
</TR>
<TR>
<TD WIDTH=799 HEIGHT=26 COLSPAN=3>
<IMG SRC="images/004r_13.gif" WIDTH=885
HEIGHT=26 ALT=""></TD>
</TR>
<TR>
<TD ALIGN=CENTER WIDTH=779 HEIGHT=52
COLSPAN=3><TABLE WIDTH=885 HEIGHT=52>
<TR>
<TD> <input type="image" name="submit"
SRC="images/nav_8.gif" WIDTH="195" HEIGHT="52"/></TD>
<TD> <input type="image" name="reset"
SRC="images/nav_9.gif" WIDTH="195" HEIGHT="52"></TD>
<TD> <a href="searchcourse1.php"><IMG
SRC="images/nav_10.gif" WIDTH=195 HEIGHT=52></a></TD>
<TD> <a href="searchcourse1.php"><IMG
SRC="images/nav_11.gif" WIDTH=194 HEIGHT=52></a></TD></TR
></TR
></TD>
</TR>

48

<TR>

<TD WIDTH=779 COLSPAN=4><TABLE WIDTH=779>

<TR>

<TD ALIGN=RIGHT WIDTH=130>REG.NO:&nbsp;</TD><TD


ALIGN=LEFT WIDTH=130><INPUT TYPE="TEXT" NAME="reg_no" size="15
max lenth="15" /></TD>
<TD ALIGN=RIGHT WIDTH=130>COLLEGE:&nbsp;</TD>
<TD ALIGN=LEFT WIDTH=130><select
name="school">
<option value="Select">Select</option>
<option value="C.S.T">COLLEGE OF SCI. &
TECH.</option>
<option value="C.O.E">COLLEGE OF
ENGINEERING</option>
<option value="C.A.M.S">COLLEGE OF ADMIN &
MGT. STUDIES</option>
<option value="C.E.S">COLLEGE OF ENVIR.
STUDIES</option>
<option value="C.O.A">COLLEGE OF
AGRIC</option>
</select></TD>
<TD ALIGN=RIGHT WIDTH=130>PROG:&nbsp;</TD>
<TD ALIGN=LEFT WIDTH=129><select
name="course">
<option value="Select">Select</option>
<option value="COMPUTER
SCIENCE">COMPUTER SCIENCE</option>
<option value="LIB. & INFO. SCIE.">LIB. &
INFO. SCIE.</option>
<option value="MASS COMMUNICATION">MASS
COMMUNICATION</option>
<option value="SCIENCE LAB. TECH.">SCIENCE
LAB. TECH.</option>
<option value="ELECTRICAL
ENGINEERING">ELECTRICAL ENGINEERING</option>
<option value="MECHANICAL
ENGINEERING">MECHANICAL ENGINEERING</option>
<option value="CIVIL ENGINEERING">CIVIL
ENGINEERING</option>
<option value="WELDING AND
FABRICATION">WELDING AND FABRICATION</option>
<option value="ARCHITECTURAL
TECHNOLOGY">ARCHITECTURAL TECHNOLOGY</option>
<option value="BUILDING
TECHNOLOGY">BUILDING TECHNOLOGY</option>
<option value="NCE TECHNICAL">NCE
TECHNICAL</option>
<option value="NUTRITION &
DIETETICS">NUTRITION & DIETETICS</option>
<option
value="STATISTICS">STATISTICS</option>
<option value="HOSPITALITY
MANAGEMENT">HOSPITALITY MANAGEMENT</option>
<option value="HOME AND RURAL
ECONOMICS">HOME AND RURAL ECONOMICS</option>

49

<option value="FISHERY
TECHNOLOGY">FISHERY TECHNOLOGY</option>
<option value="FORESTRY
TECHNOLOGY">FORESTRY TECHNOLOGY</option>
<option value="AGRICULTURAL
TECHNOLOGY">AGRICULTURAL TECHNOLOGY</option>
<option value="ANIMAL HEALTH &
PRODUCTION">ANIMAL HEALTH & PRODUCTION</option>
<option value="BUSINESS
ADMIN">BUSINESS ADMIN</option>
<option value="PUBLIC ADMIN">PUBLIC
ADMIN</option>
<option
value="ACCOUNTANCY">ACCOUNTANCY</option>
<option value="OFFICE TECH.
MGT.">OFFICE TECH. MGT.</option>
<option value="QUANTITY
SURVEY">QUANTITY SURVEY</option></select></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=130>LEVEL:&nbsp;</TD>
<TD ALIGN=LEFT WIDTH=130><select name="level">
<option value="Select">Select</option>
<option value="PRE-ND">PRE-ND</option>
<option value="ND 1">ND 1</option>
<option value="ND 2">ND 2</option>
<option value="HND 1">HND 1</option>
<option value="HND 2">HND
2</option>
<option value="SPEEL OVER">SPEEL
OVER</option></select></TD>
<TD ALIGN=RIGHT WIDTH=130>SESSION:&nbsp;</TD>
<TD ALIGN=LEFT WIDTH=130><select
name="session">
<option value="Select">Select</option>
<option
value="2001/2002">2001/2002</option>
<option
value="2002/2003">2002/2003</option>
<option
value="2003/2004">2003/2004</option>
<option
value="2004/2005">2004/2005</option>
<option
value="2005/2006">2005/2006</option>
<option
value="2006/2007">2006/2007</option>
<option
value="2007/2008">2007/2008</option>
<option
value="2008/2009">2008/2009</option>
<option
value="2009/2010">2009/2010</option>
<option
value="2010/2011">2010/2011</option>

50

<option
value="2011/2012">2011/2012</option>
<option
value="2012/2013">2012/2013</option>
<option
value="2013/2014">2013/2014</option>
<option
value="2014/2015">2014/2015</option>
</select></TD>
<TD ALIGN=RIGHT WIDTH=130>SEMESTER:&nbsp;</TD>
<TD ALIGN=LEFT WIDTH=130><select
name="semester">
<option value="FIRST SEMESTER">FIRST
SEMESTER</option></select></TD>

</TR>
</TR>
<TR>

</TABLE></TD>
<TD WIDTH=779 COLSPAN=6><TABLE WIDTH=779>

<TR>

<TD ALIGN=CENTER COLSPAN=3><BR /><BR /><U>ENTER


COURSE CODE</U></TD>
</TR>
<TR>

<TD ALIGN=RIGHT WIDTH=260>CODE</TD>


<TD ALIGN=CENTER WIDTH=260>COURSE TITLE</TD>
<TD ALIGN=LEFT WIDTH=259>CREDIT</TD>

</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"
NAME="texta1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="texta2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="texta3" size="5" max lenth="5" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"
NAME="textb1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="textb2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="textb3" size="5" max lenth="5" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"
NAME="textc1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="textc2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="textc3" size="5" max lenth="5" /></TD>

51

</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"
NAME="textd1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="textd2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="textd3" size="5" max lenth="5" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"
NAME="texte1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="texte2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="texte3" size="5" max lenth="5" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"
NAME="textf1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="textf2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="textf3" size="5" max lenth="5" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"
NAME="textg1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="textg2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="textg3" size="5" max lenth="5" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"
NAME="texth1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="texth2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="texth3" size="5" max lenth="5" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"
NAME="texti1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="texti2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="texti3" size="5" max lenth="5" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"
NAME="textj1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="textj2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="textj3" size="5" max lenth="5" /></TD>

52

</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"
NAME="textk1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="textk2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="textk3" size="5" max lenth="5" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"
NAME="textl1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="textl2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="textl3" size="5" max lenth="5" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"
NAME="textm1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="textm2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="textm3" size="5" max lenth="5" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"
NAME="textn1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="textn2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="textn3" size="5" max lenth="5" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"
NAME="texto1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="texto2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="texto3" size="5" max lenth="5" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"
NAME="textp1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="textp2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="textp3" size="5" max lenth="5" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260></TD>
<TD ALIGN=RIGHT WIDTH=260>TOTAL CREDIT</TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="total" size="5" max lenth="5" /></TD>
</TR>

53

</TABLE>
</td>
</tr>
<TR>
<TD ALIGN=RIGHT WIDTH=500><INPUT TYPE="SUBMIT"
NAME="SUBMIT" VALUE="SEND" /></TD>
<TD ALIGN=LEFT WIDTH=100><INPUT TYPE="RESET"
VALUE="CLEAR" /></TD>
</TR>
</TABLE>
<TR>
<TD WIDTH=799 HEIGHT=26 COLSPAN=3>
<IMG SRC="images/004r_13.gif" WIDTH=885
HEIGHT=26 ALT=""></TD>
</TR>
</table>
<input type="hidden" name="MM_insert" value="form1">
</FORM>
</BODY>
</HTML>
Second Semester Course Registration Page
<?php require_once('Connections/portalDB.php'); ?>
<?php
if (!isset($_SESSION)) {
session_start();
}
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";
// *** Restrict Access To Page: Grant or deny access to this
page
function isAuthorized($strUsers, $strGroups, $UserName,
$UserGroup) {
// For security, start by assuming the visitor is NOT
authorized.
$isValid = False;
// When a visitor has logged into this site, the Session
variable MM_Username set equal to their username.
// Therefore, we know that a user is NOT logged in if that
Session variable is blank.
if (!empty($UserName)) {
// Besides being logged in, you may restrict access to
only certain users based on an ID established when they login.
// Parse the strings into arrays.
$arrUsers = Explode(",", $strUsers);
$arrGroups = Explode(",", $strGroups);
if (in_array($UserName, $arrUsers)) {
$isValid = true;
}
// Or, you may restrict access to only certain users based
on their username.
if (in_array($UserGroup, $arrGroups)) {

54

$isValid = true;
}
if (($strUsers == "") && true) {
$isValid = true;
}

}
return $isValid;

$MM_restrictGoTo = "index.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",
$MM_authorizedUsers, $_SESSION['MM_Username'],
$_SESSION['MM_UserGroup'])))) {
$MM_qsChar = "?";
$MM_referrer = $_SERVER['PHP_SELF'];
if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0)
$MM_referrer .= "?" . $QUERY_STRING;
$MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar .
"accesscheck=" . urlencode($MM_referrer);
header("Location: ". $MM_restrictGoTo);
exit;
}
?>
<?php
function GetSQLValueString($theValue, $theType,
$theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ?
addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue
"NULL";
break;
case "long":
case "int":
$theValue = ($theValue
"NULL";
break;
case "double":
$theValue = ($theValue
doubleval($theValue) . "'" :
break;
case "date":
$theValue = ($theValue
"NULL";
break;
case "defined":
$theValue = ($theValue
$theNotDefinedValue;
break;
}
return $theValue;
}

!= "") ? "'" . $theValue . "'" :

!= "") ? intval($theValue) :

!= "") ? "'" .
"NULL";
!= "") ? "'" . $theValue . "'" :

!= "") ? $theDefinedValue :

55

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" .
htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] ==
"form1")) {
$insertSQL = sprintf("INSERT INTO course2 (reg_no, school,
course, `level`, `session`, semester, texta1, texta2, texta3,
textb1, textb2, textb3, textc1, textc2, textc3, textd1,
textd2, textd3, texte1, texte2, texte3, textf1, textf2,
textf3, textg1, textg2, textg3, texth1, texth2, texth3,
texti1, texti2, texti3, textj1, textj2, textj3, textk1,
textk2, textk3, textl1, textl2, textl3, textm1, textm2,
textm3, textn1, textn2, textn3, texto1, texto2, texto3,
textp1, textp2, textp3, total) VALUES (%s, %s, %s, %s, %s, %s,
%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s,
%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s,
%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s,
%s, %s, %s, %s)",
GetSQLValueString($_POST['reg_no'],
"text"),
GetSQLValueString($_POST['school'],
"text"),
GetSQLValueString($_POST['course'],
"text"),
GetSQLValueString($_POST['level'],
"text"),
GetSQLValueString($_POST['session'],
"text"),
GetSQLValueString($_POST['semester'],
"text"),
GetSQLValueString($_POST['texta1'],
"text"),
GetSQLValueString($_POST['texta2'],
"text"),
GetSQLValueString($_POST['texta3'],
"int"),
GetSQLValueString($_POST['textb1'],
"text"),
GetSQLValueString($_POST['textb2'],
"text"),
GetSQLValueString($_POST['textb3'],
"int"),
GetSQLValueString($_POST['textc1'],
"text"),
GetSQLValueString($_POST['textc2'],
"text"),
GetSQLValueString($_POST['textc3'],
"int"),
GetSQLValueString($_POST['textd1'],
"text"),
GetSQLValueString($_POST['textd2'],
"text"),

56

"int"),
"text"),
"text"),
"int"),
"text"),
"text"),
"int"),
"text"),
"text"),
"int"),
"text"),
"text"),
"int"),
"text"),
"text"),
"int"),
"text"),
"text"),
"int"),
"text"),
"text"),
"int"),
"text"),
"text"),
"int"),
"text"),
"text"),
"int"),

GetSQLValueString($_POST['textd3'],
GetSQLValueString($_POST['texte1'],
GetSQLValueString($_POST['texte2'],
GetSQLValueString($_POST['texte3'],
GetSQLValueString($_POST['textf1'],
GetSQLValueString($_POST['textf2'],
GetSQLValueString($_POST['textf3'],
GetSQLValueString($_POST['textg1'],
GetSQLValueString($_POST['textg2'],
GetSQLValueString($_POST['textg3'],
GetSQLValueString($_POST['texth1'],
GetSQLValueString($_POST['texth2'],
GetSQLValueString($_POST['texth3'],
GetSQLValueString($_POST['texti1'],
GetSQLValueString($_POST['texti2'],
GetSQLValueString($_POST['texti3'],
GetSQLValueString($_POST['textj1'],
GetSQLValueString($_POST['textj2'],
GetSQLValueString($_POST['textj3'],
GetSQLValueString($_POST['textk1'],
GetSQLValueString($_POST['textk2'],
GetSQLValueString($_POST['textk3'],
GetSQLValueString($_POST['textl1'],
GetSQLValueString($_POST['textl2'],
GetSQLValueString($_POST['textl3'],
GetSQLValueString($_POST['textm1'],
GetSQLValueString($_POST['textm2'],
GetSQLValueString($_POST['textm3'],

57

"text"),
"text"),
"int"),
"text"),
"text"),
"int"),
"text"),
"text"),
"int"),
"int"));

GetSQLValueString($_POST['textn1'],
GetSQLValueString($_POST['textn2'],
GetSQLValueString($_POST['textn3'],
GetSQLValueString($_POST['texto1'],
GetSQLValueString($_POST['texto2'],
GetSQLValueString($_POST['texto3'],
GetSQLValueString($_POST['textp1'],
GetSQLValueString($_POST['textp2'],
GetSQLValueString($_POST['textp3'],
GetSQLValueString($_POST['total'],

mysql_select_db($database_portalDB, $portalDB);
$Result1 = mysql_query($insertSQL, $portalDB) or
die(mysql_error());
$insertGoTo = "course2.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));

}
?><HTML>
<HEAD>
<TITLE>course2</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;
charset=windows-1251">
</HEAD>
<BODY LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0
bgcolor="green">
<script id=clientEventHandlersVBS language=vbscript>
<!-DIM MM
Sub texta1_onchange
if form1.texta1.value="EDU111" then
form1.texta2.value="HISTORY OF EDUCATION IN NIG"
form1.texta3.value="1"
ElseIf form1.texta1.value="EDU112" Then
form1.texta2.value="EDUCATIONAL/CHILD PSYCHOLOGY"
form1.texta3.value="1"

58

ElseIf form1.texta1.value="EDU113" Then


form1.texta2.value="PRINCIPLES & METHOD OF TEACHING"
form1.texta3.value="1"
ElseIf form1.texta1.value="EDU114" Then
form1.text1a.value="PREPRIMARY AND PRIMARY STUDIES"
form1.text1b.value="1"
ElseIf form1.texta1.value="GSE101" Then
form1.texta2.value="GENERAL ENGLISH"
form1.texta3.value="0"
ElseIf form1.texta1.value="GSE113" Then
form1.texta2.value="HEALTH LIVING"
form1.texta3.value="1"
ElseIf form1.texta1.value="GSE110" Then
form1.texta2.value="LIBRARY STUDIES"
form1.texta3.value="1"
ElseIf form1.texta1.value="TED111" Then
form1.texta2.value="INTRODUCTION TO METAL WORK"
form1.texta3.value="1"
else
msgbox("invalid course")
end if
End Sub
Sub textb1_onchange
if form1.textb1.value="EDU111" then
form1.textb2.value="HISTORY OF EDUCATION IN NIG"
form1.textb3.value="1"
ElseIf form1.textb1.value="EDU112" Then
form1.textb2.value="EDUCATIONAL/CHILD PSYCHOLOGY"
form1.textb3.value="1"
ElseIf form1.textb1.value="EDU113" Then
form1.textb2.value="PRINCIPALS & METHOD OF TEACHING"
form1.textb3.value="1"
ElseIf form1.texb1.value="EDU114" Then
form1.textb2.value="PREPRIMARY AND PRIMARY STUDIES"
form1.textb3.value="1"
ElseIf form1.textb1.value="GSE101" Then
form1.textb2.value="GENERAL ENGLISH"
form1.textb3.value="0"
ElseIf form1.textb1.value="GSE113" Then
form1.textb2.value="HEALTH LIVING"
form1.textb3.value="1"

59

ElseIf form1.textb1.value="GSE110" Then


form1.textb2.value="LIBRARY STUDIES"
form1.textb3.value="1"
ElseIf form1.textb1.value="TED111" Then
form1.textb2.value="INTRODUCTION TO METAL WORK"
form1.textb3.value="1"
else
msgbox("invalid course")
end if
End Sub
Sub textc1_onchange
if form1.textc1.value="EDU111" then
form1.textc2.value="HISTORY OF EDUCATION IN NIG"
form1.textc3.value="1"
ElseIf form1.textc1.value="EDU112" Then
form1.textc2.value="EDUCATIONAL/CHILD PSYCHOLOGY"
form1.textc3.value="1"
ElseIf form1.textc1.value="EDU113" Then
form1.textc2.value="PRINCIPALS & METHOD OF TEACHING"
form1.textc3.value="1"
ElseIf form1.texc1.value="EDU114" Then
form1.textc2.value="PREPRIMARY AND PRIMARY STUDIES"
form1.textc3.value="1"
ElseIf form1.textc1.value="GSE101" Then
form1.textc2.value="GENERAL ENGLISH"
form1.textc3.value="0"
ElseIf form1.textc1.value="GSE113" Then
form1.textc2.value="HEALTH LIVING"
form1.textc3.value="1"
ElseIf form1.textc1.value="GSE110" Then
form1.textc2.value="LIBRARY STUDIES"
form1.textc3.value="1"
ElseIf form1.textc1.value="TED111" Then
form1.textc2.value="INTRODUCTION TO METAL WORK"
form1.textc3.value="1"
else
msgbox("invalid course")
end if
MM = form1.texta3.text + form1.textb3.text + form1.textc3.text
+ form1.textd3.text + form1.texte3.text + form1.textf3.text +
form1.textg3.text + form1.texth3.text + form1.texti3.text +

60

form1.textj3.text + form1.textk3.text + form1.textl3.text +


form1.textm3.text + form1.textn3.text + form1.texto3.text +
form1.textp3.text
form1.texttotal.value = MM
End Sub
-->
</script>
<FORM name="form1" method="POST" action="<?php echo
$editFormAction; ?>">
<table width="100%" height="100%"><tr><td align="center"
valign="top"><br>
<TABLE WIDTH=779 BORDER=0 CELLPADDING=0 CELLSPACING=0
bgcolor="#e6e2e0">
<TR>
<TD WIDTH=100 HEIGHT=150>
<IMG SRC="images/logo.png" WIDTH=150
HEIGHT=150 ALT=""></TD>
<TD ALIGN=CENTER WIDTH=679 HEIGHT=150>
<H2><font size=5 color=green>HASSAN USMAN
KATSINA POLYTECHNIC </font></H2><BR />
<H3>P.M.B 2052,KATSINA</H3><BR />
<H2><U>COURSE REGISTRATION FORM</U></H2>
</TR>
<TR>
<TD WIDTH=799 HEIGHT=13 COLSPAN=3>
<IMG SRC="images/004r_07.gif" WIDTH=885
HEIGHT=13 ALT=""></TD>
</TR>
<TR>
<TD WIDTH=799 HEIGHT=29 COLSPAN=3>
<MARQUEE>MAKE SURE YOU ENTER CORRECT COURSE
WHICH CORESPOND TO ITS CODE</MARQUEE></TD>
</TR>
<TR>
<TD WIDTH=799 HEIGHT=26 COLSPAN=3>
<IMG SRC="images/004r_13.gif" WIDTH=885
HEIGHT=26 ALT=""></TD>
</TR>
<TR>
<TD ALIGN=CENTER WIDTH=779 HEIGHT=52
COLSPAN=3><TABLE WIDTH=779 HEIGHT=52>
<TR>
<TD> <input type="image" name="submit"
SRC="images/nav_8.gif" WIDTH="195" HEIGHT="52"/></TD>
<TD> <input type="image" name="reset"
SRC="images/nav_9.gif" WIDTH="195" HEIGHT="52"></TD>
<TD> <a href="searchcourse2.php"><IMG
SRC="images/nav_10.gif" WIDTH=195 HEIGHT=52></a></TD>
<TD> <a href="searchcourse2.php"><IMG
SRC="images/nav_11.gif" WIDTH=194 HEIGHT=52></a></TD></TR
></TD>
</TR>

61

<TR>

<TD WIDTH=779 COLSPAN=4><TABLE WIDTH=779>

<TR>

<TD ALIGN=RIGHT WIDTH=130>REG.NO:&nbsp;</TD><TD


ALIGN=LEFT WIDTH=130><INPUT TYPE="TEXT" NAME="reg_no" size="15
max lenth="15" /></TD>
<TD ALIGN=RIGHT WIDTH=130>COLLEGE:&nbsp;</TD>
<TD ALIGN=LEFT WIDTH=130><select
name="school">
<option value="Select">Select</option>
<option value="C.S.T">COLLEGE OF SCI. &
TECH.</option>
<option value="C.O.E">COLLEGE OF
ENGINEERING</option>
<option value="C.A.M.S">COLLEGE OF ADMIN &
MGT. STUDIES</option>
<option value="C.E.S">COLLEGE OF ENVIR.
STUDIES</option>
<option value="C.O.A">COLLEGE OF
AGRIC</option></select></TD>
<TD ALIGN=RIGHT WIDTH=130>PROG:&nbsp;</TD>
<TD ALIGN=LEFT WIDTH=129><select
name="course">
<option value="Select">Select</option>
<option value="COMPUTER
SCIENCE">COMPUTER SCIENCE</option>
<option value="LIB. & INFO. SCIE.">LIB. &
INFO. SCIE.</option>
<option value="MASS COMMUNICATION">MASS
COMMUNICATION</option>
<option value="SCIENCE LAB. TECH.">SCIENCE
LAB. TECH.</option>
<option value="ELECTRICAL
ENGINEERING">ELECTRICAL ENGINEERING</option>
<option value="MECHANICAL
ENGINEERING">MECHANICAL ENGINEERING</option>
<option value="CIVIL ENGINEERING">CIVIL
ENGINEERING</option>
<option value="WELDING AND
FABRICATION">WELDING AND FABRICATION</option>
<option value="ARCHITECTURAL
TECHNOLOGY">ARCHITECTURAL TECHNOLOGY</option>
<option value="BUILDING
TECHNOLOGY">BUILDING TECHNOLOGY</option>
<option value="NCE TECHNICAL">NCE
TECHNICAL</option>
<option value="NUTRITION &
DIETETICS">NUTRITION & DIETETICS</option>
<option
value="STATISTICS">STATISTICS</option>
<option value="HOSPITALITY
MANAGEMENT">HOSPITALITY MANAGEMENT</option>
<option value="HOME AND RURAL
ECONOMICS">HOME AND RURAL ECONOMICS</option>

62

<option value="FISHERY
TECHNOLOGY">FISHERY TECHNOLOGY</option>
<option value="FORESTRY
TECHNOLOGY">FORESTRY TECHNOLOGY</option>
<option value="AGRICULTURAL
TECHNOLOGY">AGRICULTURAL TECHNOLOGY</option>
<option value="ANIMAL HEALTH &
PRODUCTION">ANIMAL HEALTH & PRODUCTION</option>
<option value="BUSINESS
ADMIN">BUSINESS ADMIN</option>
<option value="PUBLIC ADMIN">PUBLIC
ADMIN</option>
<option
value="ACCOUNTANCY">ACCOUNTANCY</option>
<option value="OFFICE TECH.
MGT.">OFFICE TECH. MGT.</option>
<option value="QUANTITY
SURVEY">QUANTITY SURVEY</option></select></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=130>LEVEL:&nbsp;</TD>
<TD ALIGN=LEFT WIDTH=130><select
name="level">S
<option value="Select">Select</option>
<option value="PRE-ND">PRE-ND</option>
<option value="ND 1">ND 1</option>
<option value="ND 2">ND 2</option>
<option value="HND 1">HND 1</option>
<option value="HND 2">HND
2</option>
<option value="SPEEL OVER">SPEEL
OVER</option></select></TD>
<TD ALIGN=RIGHT WIDTH=130>SESSION:&nbsp;</TD>
<TD ALIGN=LEFT WIDTH=130><select
name="session">
<option value="Select">Select</option>
<option
value="2001/2002">2001/2002</option>
<option
value="2002/2003">2002/2003</option>
<option
value="2003/2004">2003/2004</option>
<option
value="2004/2005">2004/2005</option>
<option
value="2005/2006">2005/2006</option>
<option
value="2006/2007">2006/2007</option>
<option
value="2007/2008">2007/2008</option>
<option
value="2008/2009">2008/2009</option>
<option
value="2009/2010">2009/2010</option>
<option
value="2010/2011">2010/2011</option>

63

<option
value="2011/2012">2011/2012</option>
<option
value="2012/2013">2012/2013</option>
<option
value="2013/2014">2013/2014</option>
<option
value="2014/2015">2014/2015</option></select></TD>
<TD ALIGN=RIGHT WIDTH=130>SEMESTER:&nbsp;</TD>
<TD ALIGN=LEFT WIDTH=130><select
name="semester">
<option value="SECOND SEMESTER">SECOND
SEMESTER</option></select></TD>

</TR>
</TABLE></TD>
</TR>
<TR>
<TR>

<TD WIDTH=779 COLSPAN=6><TABLE WIDTH=779>

<TD ALIGN=CENTER COLSPAN=3><BR /><BR /><u>ENTER


COURSE CODE</u></TD>
</TR>
<TR>

</TR>
<TR>

<TD ALIGN=RIGHT WIDTH=260>CODE</TD>


<TD ALIGN=CENTER WIDTH=260>COURSE TITLE</TD>
<TD ALIGN=LEFT WIDTH=259>CREDIT</TD>

<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"


NAME="texta1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="texta2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="texta3" size="5" max lenth="5" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"
NAME="textb1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="textb2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="textb3" size="5" max lenth="5" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"
NAME="textc1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="textc2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="textc3" size="5" max lenth="5" /></TD>
</TR>

64

<TR>

<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"


NAME="textd1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="textd2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="textd3" size="5" max lenth="5" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"
NAME="texte1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="texte2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="texte3" size="5" max lenth="5" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"
NAME="textf1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="textf2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="textf3" size="5" max lenth="5" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"
NAME="textg1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="textg2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="textg3" size="5" max lenth="5" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"
NAME="texth1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="texth2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="texth3" size="5" max lenth="5" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"
NAME="texti1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="texti2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="texti3" size="5" max lenth="5" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"
NAME="textj1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="textj2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="textj3" size="5" max lenth="5" /></TD>
</TR>

65

<TR>

<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"


NAME="textk1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="textk2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="textk3" size="5" max lenth="5" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"
NAME="textl1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="textl2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="textl3" size="5" max lenth="5" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"
NAME="textm1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="textm2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="textm3" size="5" max lenth="5" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"
NAME="textn1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="textn2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="textn3" size="5" max lenth="5" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"
NAME="texto1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="texto2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="texto3" size="5" max lenth="5" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260><INPUT TYPE="TEXT"
NAME="textp1" size="10" max lenth="7" /></TD>
<TD ALIGN=CENTER WIDTH=260><INPUT TYPE="TEXT"
NAME="textp2" size="50" max lenth="30" /></TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="textp3" size="5" max lenth="5" /></TD>
</TR>
<TR>
<TD ALIGN=RIGHT WIDTH=260></TD>
<TD ALIGN=RIGHT WIDTH=260>TOTAL CREDIT</TD>
<TD ALIGN=LEFT WIDTH=259><INPUT TYPE="TEXT"
NAME="total" size="5" max lenth="5" /></TD>
</TR>
</TABLE>

66

</tr>
<TR>

</td>

<TD ALIGN=RIGHT WIDTH=500><INPUT TYPE="SUBMIT"


VALUE="SEND" /></TD>
<TD ALIGN=LEFT WIDTH=100><INPUT TYPE="RESET"
VALUE="CLEAR" /></TD>
</TR>
<input type="hidden" name="MM_insert" value="form1">
</TABLE>
<TR>
<TD WIDTH=799 HEIGHT=26 COLSPAN=3>
<IMG SRC="images/004r_13.gif" WIDTH=885
HEIGHT=26 ALT=""></TD>
</TR>
</table>
</FORM>
</BODY>
</HTML>

Pin Validation Page


<?php require_once('Connections/portalDB.php'); ?>
<?php
if (!isset($_SESSION)) {
session_start();
}
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";
// *** Restrict Access To Page: Grant or deny access to this
page
function isAuthorized($strUsers, $strGroups, $UserName,
$UserGroup) {
// For security, start by assuming the visitor is NOT
authorized.
$isValid = False;
// When a visitor has logged into this site, the Session
variable MM_Username set equal to their username.
// Therefore, we know that a user is NOT logged in if that
Session variable is blank.
if (!empty($UserName)) {
// Besides being logged in, you may restrict access to
only certain users based on an ID established when they login.
// Parse the strings into arrays.
$arrUsers = Explode(",", $strUsers);
$arrGroups = Explode(",", $strGroups);
if (in_array($UserName, $arrUsers)) {
$isValid = true;
}
// Or, you may restrict access to only certain users based
on their username.

67

if (in_array($UserGroup, $arrGroups)) {
$isValid = true;
}
if (($strUsers == "") && true) {
$isValid = true;
}
}
return $isValid;
}
$MM_restrictGoTo = "adminlogin.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",
$MM_authorizedUsers, $_SESSION['MM_Username'],
$_SESSION['MM_UserGroup'])))) {
$MM_qsChar = "?";
$MM_referrer = $_SERVER['PHP_SELF'];
if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0)
$MM_referrer .= "?" . $QUERY_STRING;
$MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar .
"accesscheck=" . urlencode($MM_referrer);
header("Location: ". $MM_restrictGoTo);
exit;
}
?>
<?php
function GetSQLValueString($theValue, $theType,
$theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ?
addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue
"NULL";
break;
case "long":
case "int":
$theValue = ($theValue
"NULL";
break;
case "double":
$theValue = ($theValue
doubleval($theValue) . "'" :
break;
case "date":
$theValue = ($theValue
"NULL";
break;
case "defined":
$theValue = ($theValue
$theNotDefinedValue;
break;
}
return $theValue;

!= "") ? "'" . $theValue . "'" :

!= "") ? intval($theValue) :

!= "") ? "'" .
"NULL";
!= "") ? "'" . $theValue . "'" :

!= "") ? $theDefinedValue :

68

}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" .
htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] ==
"form1")) {
$insertSQL = sprintf("INSERT INTO pin (s_no, pin_no, status)
VALUES (%s, %s, %s)",
GetSQLValueString($_POST['s_no'],
"int"),
GetSQLValueString($_POST['pin_no'],
"text"),
GetSQLValueString($_POST['status'],
"int"));
mysql_select_db($database_portalDB, $portalDB);
$Result1 = mysql_query($insertSQL, $portalDB) or
die(mysql_error());
$insertGoTo = "insertpin.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));

}
?><HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<link rel="icon" type="image/ico" href="images/favicon.ico"/>
<link href="themes/5/js-image-slider.css" rel="stylesheet"
type="text/css" />
<script src="themes/5/js-image-slider.js"
type="text/javascript"></script>
<link href="generic.css" rel="stylesheet"
type="text/css" />
<link rel="stylesheet" type="text/css" media="all"
href="jsDatePick_ltr.min.css" />
<script type="text/javascript"
src="jsDatePick.min.1.3.js"></script>
</head>
<link rel="stylesheet" type="text/css" href="style.css" />
<body>
<div class="container">

69

<div class="header"><img src="images/logo.jpg" width="140"


style="margin-top:6px; margin-left:10px;" height="145px;" />
<div class="orgname" ><a style="text-decoration:none"
href="index.php?Result&pag"><h1>HASSAN USMAN KATSINA
POLYTECHNIC</h1></a>
<div class="slogan"><h3>Success Through Labour....</h3></div>
</div>
<div class="menu">
<ul>
<li><a href="index.php?pag=1&Result">|Home|</a></li>
<li><a id="current" href="SCHOOL.HTML">|Colleges|</a>
</li>
<li><a id="current" href="readmore.php?pag=6&Result">|
Webmail|</a>
</li>
<li><a id="current" href="#">|Downloads|</a>

</li>

<li><a id="current" href="ABOUT.HTML">|About Us|</a>


</li>
<li><a id="current" href="CONTACT.HTML">|Contact Us|</a>
</li>
<li><a id="current" href="feedback.php?Result&msg">|
Feedback Us|</a> </li>
</ul>
</div>
<!-- end .header --></div>
<HEAD>
<TITLE>OPEN ACCOUNT PAGE</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;
charset=iso-8859-1">
<script type="text/JavaScript">
<!-function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document;
n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!
x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_validateForm() { //v4.0

70

var
i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.argum
ents;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2];
val=MM_findObj(args[i]);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must
contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a
number.\n';
if (test.indexOf('inRange') != -1)
{ p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must
contain a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+'
is required.\n'; }
}
//-->
</script>
</HEAD>
<BODY bgcolor="#9900CC" text="#333333" topmargin=0
leftmargin=0 marginwidth=0 marginheight=0>
<FORM name="form1" METHOD="POST" ACTION="<?php echo
$editFormAction; ?>">
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<FONT COLOR=red face="trebuchet ms, arial,helvetica">
<BR>
<CENTER><STRONG><H1>CREATING PIN.</H1></STRONG></CENTER>
<BR>
<TABLE ALIGN="CENTER">
<TR><TD ALIGN=RIGHT WIDTH=280>PIN NUMBER:</TD><TD ALIGN=LEFT
WIDTH=500><INPUT NAME="pin_no" TYPE="TEXT"
onBlur="MM_validateForm('pin_no','','RisNum','s_no','','RisNum
');return document.MM_returnValue" SIZE="20" /></TD></TR>
<TR><TD ALIGN=RIGHT WIDTH=280>SERIAL NUMBER:</TD><TD
ALIGN=LEFT WIDTH=500><INPUT TYPE="TEXT" NAME="s_no"
SIZE="20" /></TD></TR>
<TR><TD ALIGN=RIGHT WIDTH=280></TD><TD ALIGN=LEFT
WIDTH=500><INPUT TYPE="HIDDEN" NAME="status" VALUE="0"
/></TD></TR>

71

<TR><TD ALIGN=RIGHT WIDTH=280></TD><TD ALIGN=LEFT


WIDTH=500><INPUT TYPE="HIDDEN" NAME="reg_no" VALUE="0"
/></TD></TR><BR><BR><BR>
<TR>
<TD ALIGN=RIGHT WIDTH=280><input name="submit" type="submit"
value="submit" /></TD><TD ALIGN=LEFT WIDTH=500><input
name="reset" type="reset" value="clear" /></TD></TR>
</CENTER></TABLE>
</FONT>
<!-- PAGE BODY GOES HERE -->
</TD>

</TR>

</TABLE>
<input type="hidden" name="MM_insert" value="form1">
</form>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</BODY>
</HTML>
<div class="footer">
<div class="footerlink">

</div>
<hr />
<div style="background:#000000; height:60px; margin-bottom:10px; margin-top:-7px;">
<p>Copyright&copy;2014 - Hassan Usman Katsina
Polytechnic. All rights reserved</p>
<!-- end .footer --></div>
<!-- end .container --></div>

72

Open Account Page


<?php
if (!isset($_SESSION)) {
session_start();
}
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";
// *** Restrict Access To Page: Grant or deny access to this
page
function isAuthorized($strUsers, $strGroups, $UserName,
$UserGroup) {
// For security, start by assuming the visitor is NOT
authorized.
$isValid = False;
// When a visitor has logged into this site, the Session
variable MM_Username set equal to their username.
// Therefore, we know that a user is NOT logged in if that
Session variable is blank.
if (!empty($UserName)) {
// Besides being logged in, you may restrict access to
only certain users based on an ID established when they login.
// Parse the strings into arrays.
$arrUsers = Explode(",", $strUsers);
$arrGroups = Explode(",", $strGroups);
if (in_array($UserName, $arrUsers)) {
$isValid = true;
}
// Or, you may restrict access to only certain users based
on their username.
if (in_array($UserGroup, $arrGroups)) {
$isValid = true;
}
if (($strUsers == "") && true) {
$isValid = true;
}
}
return $isValid;
}
$MM_restrictGoTo = "pinaccount.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",
$MM_authorizedUsers, $_SESSION['MM_Username'],
$_SESSION['MM_UserGroup'])))) {
$MM_qsChar = "?";
$MM_referrer = $_SERVER['PHP_SELF'];
if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0)
$MM_referrer .= "?" . $QUERY_STRING;
$MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar .
"accesscheck=" . urlencode($MM_referrer);
header("Location: ". $MM_restrictGoTo);
exit;
}
?><?php require_once('Connections/portalDB.php'); ?>

73

<?php
// *** Redirect if username exists
$MM_flag="MM_insert";
if (isset($_POST[$MM_flag])) {
$MM_dupKeyRedirect="usernameerror.html";
$loginUsername = $_POST['user_name'];
$LoginRS__query = "SELECT user_name FROM openaccount WHERE
user_name='" . $loginUsername . "'";
mysql_select_db($database_portalDB, $portalDB);
$LoginRS=mysql_query($LoginRS__query, $portalDB) or
die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
//if there is a row in the database, the username was found
- can not add the requested username
if($loginFoundUser){
$MM_qsChar = "?";
//append the username to the redirect page
if (substr_count($MM_dupKeyRedirect,"?") >=1) $MM_qsChar =
"&";
$MM_dupKeyRedirect = $MM_dupKeyRedirect .
$MM_qsChar ."requsername=".$loginUsername;
header ("Location: $MM_dupKeyRedirect");
exit;
}
}
function GetSQLValueString($theValue, $theType,
$theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ?
addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue
"NULL";
break;
case "long":
case "int":
$theValue = ($theValue
"NULL";
break;
case "double":
$theValue = ($theValue
doubleval($theValue) . "'" :
break;
case "date":
$theValue = ($theValue
"NULL";
break;
case "defined":
$theValue = ($theValue
$theNotDefinedValue;

!= "") ? "'" . $theValue . "'" :

!= "") ? intval($theValue) :

!= "") ? "'" .
"NULL";
!= "") ? "'" . $theValue . "'" :

!= "") ? $theDefinedValue :

74

break;
}
return $theValue;

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" .
htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] ==
"form1")) {
$insertSQL = sprintf("INSERT INTO openaccount (reg_no,
user_name, password) VALUES (%s, %s, %s)",
GetSQLValueString($_POST['reg_no'],
"text"),
GetSQLValueString($_POST['user_name'],
"text"),
GetSQLValueString($_POST['password'],
"text"));
mysql_select_db($database_portalDB, $portalDB);
$Result1 = mysql_query($insertSQL, $portalDB) or
die(mysql_error());
$insertGoTo = "mainpage.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
?>
<HTML>
<HEAD>
<TITLE>CREATE ACCOUNT</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;
charset=iso-8859-1">
<script type="text/JavaScript">
<!-function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document;
n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!
x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

75

function MM_validateForm() { //v4.0


var
i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.argum
ents;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2];
val=MM_findObj(args[i]);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must
contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a
number.\n';
if (test.indexOf('inRange') != -1)
{ p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must
contain a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+'
is required.\n'; }
} if (errors) alert('The following error(s)
occurred:\n'+errors);
document.MM_returnValue = (errors == '');
}
//-->
</script>
</HEAD>
<BODY bgcolor="green" text="black" topmargin=0 leftmargin=0
marginwidth=0 marginheight=0>
<FORM name="form1" METHOD="POST" ACTION="<?php echo
$editFormAction; ?>">
<TABLE align=center WIDTH=780 BGCOLOR="green" BORDER=0
CELLPADDING=0 CELLSPACING=0>
<TR>
<TD valign=top width=205>
<IMG SRC="images/logo.png" WIDTH=150 HEIGTH=20<BR>
</TD>
<TD valign=top>
<FONT COLOR=white face="trebuchet ms, arial,helvetica">
<BR>
<CENTER><STRONG><H1>HASSAN USMAN KATSINA
POLYTECHNIC</H1></STRONG></CENTER>
<CENTER><U>CREATE ACCOUNT</U><CENTER> <BR>
<TABLE ALIGN="CENTER">
<TR>
<TD ALIGN=RIGHT WIDTH=280>REG. NUMBER:</TD>
<TD ALIGN=LEFT WIDTH=500><INPUT NAME="reg_no" TYPE="TEXT"
onBlur="MM_validateForm('reg_no','','R');MM_validateForm('reg_
no','','R');return document.MM_returnValue" SIZE="20"
/></TD></TR>
<TR>
<TD ALIGN=RIGHT WIDTH=280>USER NAME (reg.no):</TD>

76

<TD ALIGN=LEFT WIDTH=500><INPUT NAME="user_name" TYPE="TEXT"


onBlur="MM_validateForm('user_name','','R');MM_validateForm('u
ser_name','','R');MM_validateForm('password','','R');return
document.MM_returnValue" SIZE="20" /></TD></TR>
<TR>
<TD ALIGN=RIGHT WIDTH=280>PASSWORD:</TD>
<TD ALIGN=LEFT WIDTH=500><INPUT NAME="password"
TYPE="password"
onBlur="MM_validateForm('password','','R');return
document.MM_returnValue" SIZE="20" /></TD></TR>
<TR>
<TD ALIGN=RIGHT WIDTH=280>RETYPE PASSWORD: </TD>
<TD ALIGN=LEFT WIDTH=500><INPUT NAME="password2"
TYPE="password"
onBlur="MM_validateForm('password2','','R');MM_validateForm('p
assword2','','R');return document.MM_returnValue" SIZE="20"
/></TD></TR><BR><BR><BR>
<TR>
<TD ALIGN=RIGHT WIDTH=280><input name="submit" type="submit"
value="submit" /></TD><TD ALIGN=LEFT WIDTH=500><input
name="reset" type="reset" value="clear" /></TD></TR>
</TABLE>
</TD>
</TR>

</TABLE>
<input type="hidden" name="MM_insert" value="form1">
</form>
</BODY>
</HTML>

Personal Data Registration Page


<?php require_once('Connections/portalDB.php'); ?>
<?php
if (!isset($_SESSION)) {
session_start();
}
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";
// *** Restrict Access To Page: Grant or deny access to this
page
function isAuthorized($strUsers, $strGroups, $UserName,
$UserGroup) {
// For security, start by assuming the visitor is NOT
authorized.
$isValid = False;

77

// When a visitor has logged into this site, the Session


variable MM_Username set equal to their username.
// Therefore, we know that a user is NOT logged in if that
Session variable is blank.
if (!empty($UserName)) {
// Besides being logged in, you may restrict access to
only certain users based on an ID established when they login.
// Parse the strings into arrays.
$arrUsers = Explode(",", $strUsers);
$arrGroups = Explode(",", $strGroups);
if (in_array($UserName, $arrUsers)) {
$isValid = true;
}
// Or, you may restrict access to only certain users based
on their username.
if (in_array($UserGroup, $arrGroups)) {
$isValid = true;
}
if (($strUsers == "") && true) {
$isValid = true;
}
}
return $isValid;
}
$MM_restrictGoTo = "index.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",
$MM_authorizedUsers, $_SESSION['MM_Username'],
$_SESSION['MM_UserGroup'])))) {
$MM_qsChar = "?";
$MM_referrer = $_SERVER['PHP_SELF'];
if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0)
$MM_referrer .= "?" . $QUERY_STRING;
$MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar .
"accesscheck=" . urlencode($MM_referrer);
header("Location: ". $MM_restrictGoTo);
exit;
}
?>
<?php
function GetSQLValueString($theValue, $theType,
$theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ?
addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" :
"NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) :
"NULL";

78

break;
case "double":
$theValue = ($theValue
doubleval($theValue) . "'" :
break;
case "date":
$theValue = ($theValue
"NULL";
break;
case "defined":
$theValue = ($theValue
$theNotDefinedValue;
break;
}
return $theValue;
}

!= "") ? "'" .
"NULL";
!= "") ? "'" . $theValue . "'" :

!= "") ? $theDefinedValue :

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" .
htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] ==
"form1")) {
$insertSQL = sprintf("INSERT INTO pesonaldata (`session`,
first_name, middle_name, last_name, reg_no, sex, dbirth,
pbirth, home_town, local_govt, `state`, statue, religion,
corres_address, home_address, father_name, mother_name,
next_of_kin, relationship, sponsor_name, sponsor_address,
declaration) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s,
%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['session'],
"text"),
GetSQLValueString($_POST['first_name'],
"text"),
GetSQLValueString($_POST['middle_name'], "text"),
GetSQLValueString($_POST['last_name'],
"text"),
GetSQLValueString($_POST['reg_no'],
"text"),
GetSQLValueString($_POST['sex'],
"text"),
GetSQLValueString($_POST['dbirth'],
"date"),
GetSQLValueString($_POST['pbirth'],
"text"),
GetSQLValueString($_POST['home_town'],
"text"),
GetSQLValueString($_POST['local_govt'],
"text"),
GetSQLValueString($_POST['state'],
"text"),
GetSQLValueString($_POST['statue'],
"text"),

79

"text"),

GetSQLValueString($_POST['religion'],

GetSQLValueString($_POST['corres_address'], "text"),
GetSQLValueString($_POST['home_address'], "text"),
GetSQLValueString($_POST['father_name'], "text"),
GetSQLValueString($_POST['mother_name'], "text"),
GetSQLValueString($_POST['next_of_kin'], "text"),
GetSQLValueString($_POST['relationship'], "text"),
GetSQLValueString($_POST['sponsor_name'], "text"),
GetSQLValueString($_POST['sponsor_address'], "text"),
GetSQLValueString($_POST['declaration'], "text"));
mysql_select_db($database_portalDB, $portalDB);
$Result1 = mysql_query($insertSQL, $portalDB) or
die(mysql_error());
$insertGoTo = "regform.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN">
<html>
<head>
<title>PERSONAL DATA</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<script type="text/JavaScript">
<!-function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document;
n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!
x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

80

function MM_validateForm() { //v4.0


var
i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.argum
ents;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2];
val=MM_findObj(args[i]);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must
contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a
number.\n';
if (test.indexOf('inRange') != -1)
{ p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must
contain a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+'
is required.\n'; }
} if (errors) alert('One of the field is empty');
document.MM_returnValue = (errors == '');
}
//-->
</script>
</head>
<body bgcolor="green">
<br>
<form name="form1" action="<?php echo $editFormAction; ?>"
method="POST">
<table width="715" border="2" align="center" cellpadding="2"
cellspacing="2" bgcolor="#e6e2e0">
<tr>
<td><img src="images/topbar.gif" width="715"
height="27"></td>
</tr>
<tr>
<td background="images/bg1.gif"><table width="715"
border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="150"><img src="images/logo.jpg"
width="120" height="100"></td>
<td width="715" align="center"><H3><font size=5
color=green>HASSAN USMAN KATSINA
POLYTECHNIC</font><br><u><font color= red>STUDENT'S PERSONAL
DATA</font></U></H3></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="1" bgcolor="#FFFFFF"><img
src="images/spacer.gif" width="20" height="1"></td>
</tr>
<tr align="center">

81

<td bgcolor="FFEB8A">&nbsp;</td>
</tr>
<tr align="center">
<td background="images/bar_bg.gif" bgcolor="FFEB8A"><table
width="650" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="650"><marquee>MAKE SURE YOU ENTERED
CORRECT INFORMATION</marquee></td>
</tr>
</table>
</td>
</tr>
<tr align="center">
<td bgcolor="#FFFFFF"><table width="715" border="0"
cellspacing="0" cellpadding="0" >
<tr>
<TD> <input type="image" name="submit"
SRC="images/nav_8.gif" WIDTH="175" HEIGHT="52"/></TD>
<TD> <input type="image" name="reset"
SRC="images/nav_9.gif" WIDTH="176" HEIGHT="52"></TD>
<TD> <a href="seaper.php"><IMG SRC="images/nav_10.gif"
WIDTH=176 HEIGHT=52></a></TD>
<TD> <a href="seaper.php"><IMG SRC="images/nav_11.gif"
WIDTH=176 HEIGHT=52></a></TD>
</tr>
</td></table>
<tr>
<td bgcolor="#FFFFFF"><table width="715" border="0"
cellspacing="0" cellpadding="0" bgcolor="#e6e2e0">
<tr>
<td align=center><br />Session:&nbsp;&nbsp;<select
name="session"><option selected="selected"
value="select">Select</option>
<option value="2001/2002">2001/2002</option>
<option value="2002/2003">2002/2003</option>
<option value="2003/2004">2003/2004</option>
<option value="2004/2005">2004/2005</option>
<option value="2005/2006">2005/2006</option>
<option value="2006/2007">2006/2007</option>
<option value="2007/2008">2007/2008</option>
<option value="2008/2009">2008/2009</option>
<option value="2009/2010">2009/2010</option>
<option value="2010/2011">2010/2011</option>
<option value="2011/2012">2011/2012</option>
<option value="2012/2013">2012/2013</option>
<option value="2013/2014">2013/2014</option>
<option value="2014/2015">2014/2015</option>
</select>
</td>
</tr>
<tr>
<td align="centre"><br />First Name:&nbsp;
<input name="first_name" type="text"
onBlur="MM_validateForm('first_name','','R');return
document.MM_returnValue" size="15" maxlength="20" />

82

Middle Name:&nbsp;<input name="middle_name"


type="text"
onBlur="MM_validateForm('middle_name','','R');return
document.MM_returnValue" size="15" maxlength="20" />
Last Name:&nbsp;<input type="text"
name="last_name" size="15" maxlength="20" /></td>
</tr>
<tr>
<td align=center><br />Reg. No:&nbsp;<input
name="reg_no" type="text"
onBlur="MM_validateForm('reg_no','','R');return
document.MM_returnValue" size="20" maxlength="20" />
&nbsp;Sex:<select name="sex">
<option selected="selected" value="select"
>Select</option>
<option value="Male" >Male</option>
<option value="Female"
>Female</option></select></td>
</tr>
<tr>
<td align=center><br />Date of Birth:<input
name="dbirth" type="text"
onBlur="MM_validateForm('dbirth','','R');return
document.MM_returnValue" size="10" maxlength="10" />
Place of Birth:<input name="pbirth" type="text"
onBlur="MM_validateForm('pbirth','','R');return
document.MM_returnValue" size="20" maxlength="20" />
Home Town:<input name="home_town" type="text"
onBlur="MM_validateForm('home_town','','R');return
document.MM_returnValue" size="20" maxlenGth="20" /></td>
</tr>
<tr>
<td align="left" width="200"><font size="1">yyyy/mm/dd</font></td>
</tr>
<tr>
<td align=center><br />Local Government:
<input name="local_govt" type="text"
onBlur="MM_validateForm('local_govt','','R');return
document.MM_returnValue" size="15" maxlenGth="15" />
&nbsp;State of Origin:
<input name="state" type="text"
onBlur="MM_validateForm('state','','R');return
document.MM_returnValue" size="10" maxlenGth="10" />
</td>
</tr>
<tr>
<td align=center><br />Marital Status:<select
name="statue">
<option value="single">single</option>
<option value="married">Married</option></select>
&nbsp;&nbsp;Religion:<select name="religion">
<option selected="selected"
value="select">select</option>
<option value="muslim">Muslim</option>
<option value="cristian">Cristian</option>

83

<option
value="others">others</option></select><br />
</td>
</tr>
<tr>
<td align=center><br />Full Correspondence
Addresss:<br /><textarea name="corres_address" rows="2"
cols="50"></textarea>
</td>
</tr>
<tr>
<td align=center><br />Permanent Home Address:<br
/><textarea name="home_address" cols="50" rows="2"
onBlur="MM_validateForm('home_address','','R');return
document.MM_returnValue"></textarea>
</td>
</tr>
<tr>
<td align=center><br />Father's Name:&nbsp;<input
name="father_name" type="text"
onBlur="MM_validateForm('father_name','','R');return
document.MM_returnValue" size="30" maxlenGth="30" />
</td>
</tr>
<tr>
<td align=center><br />Mother's Name:&nbsp;<input
name="mother_name" type="text"
onBlur="MM_validateForm('mother_name','','R');return
document.MM_returnValue" size="30" maxlenGth="30" />
</td>
</tr>
<tr>
<td align =center><br />Name of Next of
Kin:&nbsp;<input name="next_of_kin" type="text"
onBlur="MM_validateForm('next_of_kin','','R');return
document.MM_returnValue" size="30" maxlenGth="30" />
</td>
</tr>
<tr>
<td align=center><br />Relationship with Next of
Kin:&nbsp;<input name="relationship" type="text"
onBlur="MM_validateForm('relationship','','R');return
document.MM_returnValue" size="30" maxlenGth="30" />
</td>
</tr>
<tr>
<td align=center><br />Name of Sponsors:<input
name="sponsor_name" type="text"
onBlur="MM_validateForm('sponsor_name','','R');return
document.MM_returnValue" size="30" maxlenGth="30" />
</td>
</tr>
<tr>
<td align=center><br />Sponsor's Address:<br />
<textarea name="sponsor_address" cols="50" rows="2"
onBlur="MM_validateForm('sponsor_address','','R');return
document.MM_returnValue"></textarea></td>
</tr>
<tr>
<td center><br /><p><input type="radio"
name="declaration" value="declare"><i>&nbsp;I do hereby
declare that the information

84

i have given above is to the best of my knowledge


and honour correct</i></p>
</td>
</tr>
<tr>
<td align=center><br /><br /><input type="submit"
name="submit" value="submit"/>
&nbsp;&nbsp;<input type="reset" value="reset"/>
</td>
</tr>
</table>
<br />
<br />
</td>
</tr>
<tr>
<td align=center background="images/bg1.gif"
width="715"><FONT SIZE=-2>&copy;2014 Hassan Usman Katsina
Polytechnic, Katsina&nbsp;&nbsp;Privacy Policy</FONT>&nbsp;
</td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form1">
</form>
</body>
</html>

85