Professional Documents
Culture Documents
BY
ISYA ISYAKU
N12CS059
ABUBAKAR MUHAMMAD
N12CS092
BILKISU BASHIR
N12CS030
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)
____________________________
_________________________
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,
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
1.2
1.3
1.4
1.5
CHAPTER 2.................................................................................................................4
LITERATURE REVIEW..............................................................................................4
2.1
Introduction....................................................................................................4
2.2
Online Registration........................................................................................5
2.2.1
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
3.2.1.4
Observation.......................................................................................14
3.2.1.5
Interview...........................................................................................14
3.2.1.6
3.2.2
3.2.3
Design...................................................................................................15
Development.............................................................................................18
3.2.3.1
3.2.3.2
3.2.4
CHAPTER 4...............................................................................................................20
RESULTS AND DISCUSSION.................................................................................20
4.1
Introduction..................................................................................................20
4.2
4.2.1
4.2.2
4.3
System Requirements...................................................................................27
4.4
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
1.2
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
1.4
1.5
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
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
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
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.
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
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
Waterfall Model
The waterfall model has the following phases of development, below is a
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
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.
Head of Department
Academic Secretary
12
Bank
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
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.
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
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.
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
18
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
1.
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
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
20
Start
PHP Code
Valid
No
Yes
Registration forms
Stop
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
4.2.1
24
First Semester Course Registration Form: This page allow user to register
courses to be offered for the first semester.
25
4.2.2
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.
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.
ii.
4.4
28
CHAPTER 5
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
</li>
33
<img
src="images/arrowsm.gif" width="4" height="5"
align="absmiddle">
<span class="sub">PASSWORD<br>
<input name="password" type="password"
size="12" maxlength="15">
<br>
<br>
<input type="checkbox" name="checkbox"
value="checkbox">
&n
bsp;
<input name="submit" type="submit"
value="submit">
</form></td>
</tr>
</table>
<p> <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> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </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>
</div>
<hr />
<div style="background:#000000; height:60px; margin-bottom:10px; margin-top:-7px;">
<p>Copyright©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>
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>
38
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</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
40
</p>
<p>
</p>
<p>
</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;
}
!= "") ? 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
46
47
form1.texttotal.value = MM
-->
</script>
48
<TR>
<TR>
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: </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: </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: </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>
</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;
}
!= "") ? 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
59
60
61
<TR>
<TR>
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: </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: </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: </TD>
<TD ALIGN=LEFT WIDTH=130><select
name="semester">
<option value="SECOND SEMESTER">SECOND
SEMESTER</option></select></TD>
</TR>
</TABLE></TD>
</TR>
<TR>
<TR>
</TR>
<TR>
64
<TR>
65
<TR>
66
</tr>
<TR>
</td>
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;
!= "") ? 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
</li>
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> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </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>
</TABLE>
<input type="hidden" name="MM_insert" value="form1">
</form>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </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©2014 - Hassan Usman Katsina
Polytechnic. All rights reserved</p>
<!-- end .footer --></div>
<!-- end .container --></div>
72
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;
!= "") ? 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
76
</TABLE>
<input type="hidden" name="MM_insert" value="form1">
</form>
</BODY>
</HTML>
77
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
81
<td bgcolor="FFEB8A"> </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: <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:
<input name="first_name" type="text"
onBlur="MM_validateForm('first_name','','R');return
document.MM_returnValue" size="15" maxlength="20" />
82
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: <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: <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: <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: <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> I do hereby
declare that the information
84
85