0% found this document useful (0 votes)
22 views36 pages

It Report Computer Science 3

Uploaded by

Lionel Richie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views36 pages

It Report Computer Science 3

Uploaded by

Lionel Richie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 36

CHAPTER ONE

INTRODUCTION
1.1 HISTORY OF SIWES
In the earlier stage of science and technology education in Nigeria, students were graduating
from their respective institution without any technical knowledge or working experience. It
was in this view that students undergoing science and technology related courses in different
institutions were mandated for SIWES in the view of widening their horizons so as to enable
them have technical knowledge or working experience before graduating from their various
institutions.

The Student Industrial Work Experience Scheme (SIWES) was established by the Industrial
Training Fund (ITF) in 1973 to enable students of tertiary institutions have basic technical
knowledge of industrial work based on their course of study before the completion of their
program in their respective institutions. The scheme was designed to expose students to
industrial environment and enable them develop occupational competencies so that they can
readily contribute their quota to national economic and technological development after
graduation. The major benefit accruing to students who participate conscientiously in
student’s industrial work experience scheme are the skills and competencies they acquire.
The relevant production skills remain part of the recipients of Industrial Training as lifelong
assets which cannot be taken away from them. This is because the knowledge and skill
acquired through training are internalized and become relevant when required to perform jobs
or functions.

In connection to supervision, when an understudy has been sent by the colleges, schools or
polytechnics as the case might be for industrial Attachment, supervisors from the individual
schools are sent to assess the understudy and affirm that the understudy is entirely industrial
connection and furthermore that the understudy is not kidding with his/her SIWES exercises.
Industry-based bosses additionally help to screen the understudies in such manner.

1.2 OBJECTIVES OF SIWES


The Industrial Training Fund’s policy document number one (1) of 1973 which established
SIWES outlined the objectives of the scheme.

The objectives are to:

a) Provide an avenue for students in the Nigerian universities to acquire


industrial skills and experience in their course of study.
b) Prepare students for the work situation they are likely to meet after graduation.
c) Expose students to work methods and techniques in handling equipment and
machinery that may not be available in universities;

1
d) Make from the university to the world of work easier, and thus enhance
student’s contacts for later job placement.
e) Provide students with the opportunity to apply their theoretical knowledge in
real work situation, thereby bridging the gap between university work and
actual practice.
f) Enlist and strengthen employer’s involvement in the entire educational process
of preparing university graduates for employment in industry.

1.3 IMPORTANCE OF SIWES

a) It provides practical Knowledge to student’s base on their course of study.


b) It bridges the gap between students and real-life situations of work.
c) It gives students experience on how life after school looks like.
d) Appreciate the role of professions in their various fields as the creators of change,
wealth and indispensable contributors to growing the economy and natural
development
e) Appreciate the connection between their courses of study and other related
disciplines in the production of goods and services,

1.4 HISTORY, ACTIVITIES AND ORGANISATION OF THE


TRAINING ESTABLISHMENT
Digital Dreams Limited is one of the leading IT firms in Nigeria registered by corporate
affairs commission of Nigeria in September 2007 with the registration No. RC 708352. They
offer advanced IT solutions to companies, organizations and institutions for efficient and
effective operation. The firm stands out as one of the top 10 ICT companies in Nigeria and is
soaring high to become one of the top best in sub-Saharan Africa with specialty in web
design, animations, software development and ICT training. By developing world class
software, we ease institutions and organizations operation. Digital dreams strive to integrate
technology in every field of life thereby promoting and enhancing institutional and
organizational efficiency.

They specialize in development of IT solutions to increase individual and corporate


efficiency and productivity. They seek to be one of the major ICT players in Africa and
dominating the global ICT market with their product brands and promoting societal
efficiency through the use of technology. They believe that technology and art are inseparable
justifying why we ventured into animation and graphics. Our experience has made us expand
our horizon and created the first animation video in Southern Nigeria.

2
MANAGING DIRECTOR

CENTER MANAGER

FRONT DESK WELFARE IT


INSTRUCTORS
STAFF STAFF DEPARTMENT

Fig 1.4.1: Company’s Organization Chart

3
CHAPTER TWO

WEB DEVELOPMENT AND DESIGN

2.1 DEFINITON OF WEB DEVELOPMENT AND DESIGN

Web development is the building, creating, and maintenance of websites. It is the work that
happens behind the scenes in order to develop a website and make it look great, work fast and
perform well with a seamless user experience. It includes aspects such as web design, web
publishing, web programming, and database management.

Web design is the skills and discipline of production and maintenance of websites which
include interface design, page coding, hosting and search engine optimization.

Web developers do this by using a variety of coding languages. The languages they use
depends on the types of tasks they are preforming and the platforms on which they are
working. Web development skills are in high demand worldwide and well paid too – making
development a great career option. It is one of the easiest accessible higher paid fields as you
do not need a traditional university degree to become qualified.

The field of web development is generally broken down into front-end (the client side) and
back-end (the server side) and Dev. OP’s (development operations)

2.2 WEB SITES AND WEB PAGES

A website is not the same thing as a Web page. Though the two terms are often used
interchangeably, they should not be. So, what's the difference? To put it simply, a Web site is
a collection of web pages while a Web page is an individual HTML document which makes
up the World Wide Web.

2.2.1 TYPES OF WEB PAGES

 Static Webpage: A static webpage also known as flat or stationary page is one that does
not change when a site visitor requests it. They show the same content each time they are
viewed.

4
2.2.2 STEPS IN STATIC WEB PAGE PROCESS

Step 1: Web browser request static page.

Step 2: Web server finds page.

Step 3: Web server sends page to requesting browser.

 Dynamic Webpage: Dynamic pages have contents that can change each time they are
accessed. It is modified by the server before it is sent to the requesting browser. These
pages are typically written in scripting languages.

2.2.3 STEPS IN DYNAMIC WEB PAGE PROCESS

Step 1: Web browser request dynamic page.

Step 2: Web server finds page and passes it to application server.

Step 3: Application server scans page for instructions and finishes page.

Step 4: Application server passes finished page back to web server.

Step 5: Web server sends finished page to requesting browser.

2.3 WEB DESIGN TOOLS


Web design tools refer to software programs and reference materials used to create a
pleasing and effective Internet screen for a website. They can be classified into
three groups which are Word processors, Graphic applications and HTML editors.

5
WORD PROCESSOR GRAPHIC APPLICATIONS HTML EDITOR

Word Pad Adobe Photoshop Dream Weaver

Notepad Corel Draw Visual Studio

Code

Picasa Sublime Text

Table 2.3.1: Web Design Tools

6
CHAPTER THREE

SECTIONS OF WEB DEVELOPMENT: FRONT END


WEB DEVELOPMENT
3.1 FRONT END WEB DEVELOPMENT

The front end also called “client-side” programming is what happens in the browser. It’s
everything the user sees and interacts with.

A front-end development takes care of layout, design and interactivity using HTML, CSS and
JavaScript. They take an idea from the drawing board and turn it into reality. What you see
and what you use, such as the visual aspect of the website, the drop-down menus and the text,
are all brought together by the front-end developer, who writes a series of programs to bind
and structure the elements, make them look good and add interactivity. These programs are
run through a browser.

3.2 THE BASICS OF FRONT-END TOOLS & TECHNOLOGY

Back in the day, websites were simple, static text sites with a bit of formatting and maybe
even some animation.

It’s important to note that front-end development has changed significantly over the past 10 to
15 years with the explosive growth of new programming and scripting languages, which
wasn’t as ubiquitous on the front end as it is now, or even as common on the back end.

Some of the core technologies used in front-end web development include:

1. HTML (The Organizer)


2. CSS (The Stylist)
3. JavaScript/JQuery (The Multitasker)

7
3.3 HTML (HYPERTEXT MARKUP LANGUAGE)

HTML stands for Hyper Text Markup Language. It is the standard markup language for
creating Web pages. HTML is how every site on the web is organized, so it’s a big one you
can’t live without in front-end development.

3.4 HTML TAGS, ELEMENTS AND ATTRIBUTES

In HTML it is the tags that are the markup. The special meaning these tags give is a
description of the structure of the document. For example, the opening paragraph tag says
“This is the beginning of a paragraph” and the closing tag says “This is the end of the
paragraph.” Without the markup, the words in the middle would just be another bit of text; it
would not be clear that they formed a paragraph. HTML consists of a series of elements that
describes the structure of a Web page. These elements tell the browser how to display the
content. HTML elements label pieces of content such as "this is a heading", "this is a
paragraph", "this is a link", etc.

The html elements have attributes which describes the element. The attributes are added on
the opening tag and each has a name and value.

The name is the property you want to set and the value is what you want the value of the
property to be.

Example: the <font> element has size, face, color as attributes with different values. The
values should be enclosed in double quotation marks.

<font size= “+1” face= “Calibri Light Head” color= “red”></font>

These are examples of some HTML tags and their descriptions:

8
TAGS DESCRIPTION

<!DOCTYPE> Defines the document type

<html> Defines the root of an HTML document

<a> Defines a hyperlink

<head> Defines information about the document

<body> Defines the document's body

<li> Defines a list item

<table> Defines a table

Defines the relationship between a document and an external


<link>
resource (most used to link to style sheets)

<form> Defines an HTML form for user input

Table 3.4.1: HTML Tags

9
3.5 CSS (CASCADING STYLE SHEET)

CSS stands for Cascading Style Sheets. It is a language designed to specify the style, layout,
and appearance of various elements on webpages. CSS covers fonts, colors, margins, lines,
height, width, background images, advanced positions and many other things.

Cascading Style Sheets (CSS) is how developers add styling and effects to a website. Styles
can be added globally, then layered on without changing that fundamental styling that gets
applied to a whole site.

It allows one to adapt the presentation to different types of devices, such as large screens,
small screens, or printers. The separation of HTML from CSS makes it easier to maintain
sites, share style sheets across pages, and tailor pages to different environments.

Many front-end developers use a CSS preprocessor to make writing lots of lines of CSS even
faster.

3.6 CSS FRAMEWORKS

In its simplest form, a CSS framework is a collection of CSS stylesheets that are prepped and
ready to use. They’re tailored for use in common situations, like setting up navbars, and are
often expanded upon by other technologies such as SASS and JavaScript. Basically, all you
need to do is writeup your HTML with the appropriate structure, classes, and IDs and you’re
off to the races. However, instead of that stylesheet being specifically for the home page
you’re working on, it’s ready to accommodate a general “standard” of home page, having
classes for things commonly found on other home pages (i.e. navbar, footer, slider, hamburger
menu, 3 column layout). This allows you to quickly setup web pages without having to deep
dive into some CSS, saving a bunch of time.

3.7 CSS SELECTORS


1. Simple selectors:

10
 Type selector: Selects all elements that match the given node name.

Syntax: element-name {…….}

Example: input will match any <input> element, input{…….}

 Class selector: Selects all elements that have the given class attribute.
Syntax: .classname {………}
Example: .index will match any element that has a class of "index", .classname
{………}

 ID selector: Selects an element based on the value of its id attribute. There should be
only one element with a given ID in a document.
Syntax:#idname
Example: #toc will match the element that has the ID "toc", #toc {……}

 Universal selector: Selects all elements. Optionally, it may be restricted to a specific


namespace.
Syntax: *{…..}
Example: * will match all the elements of the document

 Attribute selector: Selects elements based on the value of the given attribute.
Syntax: [attr][attr=value] [attr~=value] [attr|=value] [attr^=value] [attr$=value]
[attr*=value]
Example: [autoplay] will match all elements that have the autoplay attribute set (to any
value) /* <a> elements with a title attribute */
a[title] {
color: purple;
}

2. Combinators:
 Adjacent sibling combinator : The + combinator selects adjacent siblings. This means
that the second element directly follows the first, and both share the same parent.
Syntax:A+B
Example: h2 + p will match all <p> elements that directly follow an <h2>.

11
/* Paragraphs that come immediately after any image */
img + p {
font-style: bold;
}

 General sibling combinator : The general sibling combinator selects siblings. This
means that the second element follows the first (though not necessarily immediately),
and both share the same parent. It is denoted by” ~”.
Syntax:A~B
Example: p ~ span will match all <span> elements that follow a <p>.
/* Paragraphs that are siblings of and subsequent to any image */
img ~ p {
color: red;
}

 Child combinator: The child combinator selects nodes that are direct children of the
first element. It is denoted by” >”.
Syntax: A > B
Example: ul > li will match all <li> elements that are nested directly inside a <ul>
element.
/* List items that are children of the "my-things" list */
ul.my.things>li{
margin:2px;
}

 Descendant combinator: This combinator selects nodes that are descendants of the first
element. It id denoted by a space “ ”.
Syntax: A B
Example: div span will match all <span> elements that are inside a <div> element.
/* List items that are descendants of the "my-things" list */
ul.my-things li {
margin: 2px;
}

12
 Pseudo-classes: Pseudo-classes allow the selection of elements based on state
information that is not contained in the document tree.
Example: a:visited will match all <a> elements that have been visited by the user.
div:hover {
background-color: #F89B4D;
}

 Pseudo-elements: Pseudo-elements represent entities that are not included in HTML.


Example: p::first-line will match the first line of all <p> elements.
/* The first line of every <p> element. */
p::first-line {
color: blue;
text-transform: uppercase;
}

3.8 CSS PROPERTIES

CSS properties are used to apply styles to structured document, such as those created with
HTML or XML.
CSS properties are specified in the CSS standard. Each property has a set of possible values.
Some properties can affect any type of element and others apply only to particular groups of
elements.
CSS properties are used within a declaration block with a corresponding value.
CSS properties can be generally classified into four groups:
1. Text properties.
2. List properties.
3. Font properties.
4. Border properties.

Here are some examples of these properties

13
PROPERTIES DESCRIPTION VALUES

TEXT PROPERTIES
color Sets the color of a text RGB, hex, keyword

text align Aligns the text in an element left, right, center, justify

text-transform Controls the letters in an element none, capitalize, uppercase,


lowercase

LIST PROPERTIES

list-style Sets all the properties for a list in one list-style-type, list-style-
declaration position, list-style-image, inherit

list-style-type Specifies the type of list-item marker none, disc, circle, square,
decimal, decimal-leading-zero
list-style-image Specifies an image as the list-item URL, none, inherit
marker

BORDER PROPERTIES

Border Sets all the border properties in one border-width, border-style,


declaration border-color
border-color Sets the color of the four borders color_name, rgb_number,
transparent, inherit
border-style Sets the style of the four borders none, hidden, dotted, dashed,
double, groove, ridge, inset,
outset, inherit
FONT PROPERTIES
font-family Specifies the font family for text family-name, generic-family,
inherit
font-style Specifies the font style for text normal, italic, oblique, inherit
font-weight Specifies the weight of a font normal, bold, bolder, lighter,
100, 200, 300, 400, 500, 600

14
Table 3.8.1: CSS Properties

CHAPTER FOUR

SECTIONS OF WEB DEVELOPMENT: BACK END WEB


DEVELOPMENT

4.1 BACK END WEB DEVELOPMENT


Backend development is what keeps the internet running behind the scenes. Backend
developers are primarily focused on how a website works. They write code that focuses on
the functionality of the application they’re working on and the technology they work on is
never directly seen by users.

The backend of the web consists of the server that hosts the website, an application for
running it and a database to contain the data. The backend developers uses computer
programs to ensure that the server, the application and the database runs smoothly together.
This type of development need to analyze what a company’s needs and provide efficient
programming solutions.

The tech of the backend is a combination of servers, applications, and databases.


Responsibilities of backend programmers could involve writing APIs, writing code to interact
with a database, creating libraries, working on business processes and data architecture, and
much more. It often depends on the specific role and company.

Backend web development lays the foundational code that enables websites to process the
actions that users take on the front end and deliver the correct information in return.

4.2 TYPES OF BACKEND DEVELOPMENT LANGUAGES

Backend programming can either be object-oriented (OOP) or functional. The former is the
technique that focuses on the creation of objects. With object-oriented programming,
statements should be executed in a particular order. Popular OOP languages are Java, PHP,
JavaScript and Python. Languages can either be statically typed or dynamically typed.

4.3 PHP

15
PHP is a recursive acronym for "PHP: Hypertext Preprocessor". PHP is a server side
scripting language that is used to manage dynamic content, databases, session tracking, etc.
The language was first released in 1995 when there were few options for building dynamic
websites. It is integrated with a number of popular databases, including MySQL, Oracle,
Sybase, and Microsoft SQL Server. The syntax for Php is <? Php……..?>

4.3.1 COMMON USES OF PHP

1. PHP performs system functions, i.e. from files on a system it can create, open, read,
write, and close them.
2. It can handle forms, i.e. gather data from files, save data to a file, through email you
can send data, return data to the user.
3. You can add, delete, modify elements within your database through PHP.
4. Access cookie variables and set cookies.
5. Using PHP, you can restrict users to access some pages of your website.
6. It can encrypt data.

In order to develop and run PHP Web pages three vital components need to be installed on
your computer system. These components are:

 Web Server

 Database

 Php Parser

Php powers 78.2% of all websites whose server-side programming language we know. The
language was first released in 1995 when there were few options for building dynamic
websites. Since PHP is dynamically typed, it means you’re able to come up with a variety of
solutions and workarounds for one problem. It also means that the same bit of code can mean
something different depending on the context, which makes programs written in PHP tricky
to scale and sometimes slow to run.

PHP is a great language to learn for those who are just starting out for a number of reasons:

16
1. It’s more forgiving of errors, which means that you’re able to compile and run a
program until you reach a problematic part.
2. There is an abundance of resources dedicated to the language as a result of the large
community and tool support. The language undergoes updates, so ensure you’re
learning from an up-to-date tutorial.

4.3.2 WHAT YOU CAN DO WITH PHP

According to the PHP website, you can:

1. Collect form data


2. Send and receive cookies
3. Write command line scripting
4. Generate dynamic page content
5. Write desktop applications
6. Write server-side scripting

4.3.3 COMMENTING PHP CODE

A comment is the portion of a program that exists only for the human reader and stripped out
before displaying the programs result. There are two commenting formats in PHP:

1. Single-line comments: They are generally used for short explanations or notes
relevant to the local code. e.g. #,//
2. Multi-lines comments: They are generally used to provide pseudocode algorithms
and more detailed explanations when necessary. The multiline style of commenting is
the same as in C. e.g. /* ............*/
4.4 PHP VARIABLES

A variable is a memory location which contains some known or unknown values. The value
of a variable can change within a program.

4.4.1 WHAT IS VARIABLE SCOPE?

Scope can be defined as the range of availability a variable has to the program in which it is
declared. PHP variables can be one of four scope types:

17
1. Local Variables: A variable declared in a function is considered local, i.e. it can be 9
referenced solely in that function. Note that any assignment outside of that function
will be considered to be entirely different variable from the one contained in the
function.

$x = 4;
function assignx () {
$x = 0;
echo "x inside function is $x";
}
assignx();
echo "x outside of function is $x";

2. Global Variables: In contrast to local variables, a global variable can be accessed in


any part of the program. However, in order to be modified, a global variable must be
explicitly declared to be global in the function in which it is to be modified. This is
accomplished, conveniently enough, by placing the keyword GLOBAL in front of the
variable that should be recognized as global.

$somevar = 15;

function addit() {

GLOBAL $somevar;

$somevar++;

echo "Somevar is $somevar";

addit();

3. Static Variables: The final type of variable is known as static. In contrast to the
variables declared as function parameters, which are destroyed on the function's exit,
a static variable will not lose its value when the function exits and will still hold that

18
value should the function be called again. You can declare a variable to be static
simply by placing the keyword STATIC in front of the variable name.
Example i:
function keep_track() {
STATIC $count = 0;
$count++;
echo $count;
}
keep_track();
keep_track();
keep_track();

Example ii:
<form action=“process.php" method="POST">
<p>
Username
<input name="username" type="text"/>
</p>
<p>Password
<input name="password" type="password" />
</p>
<p>
<label for="button"></label>
<input type="submit" name="submit" id="button"
value=“register" />
</p>
</form>

if(isset($_POST['submit'])) {

$username = $_POST[“username"];

$password = $_POST[“password”];

echo “registration was successful”;

}else{

19
echo “unable to register”;

4.4.2 VARIABLE TYPES

The main way to store information in the middle of a PHP program is by using a variable. The 7
important thing to know about variable in PHP includes:

1. All variable in PHP are denoted with a leading dollar sign ($).
2. The value of a variable is the value of its most recent assignment.
3. Variables are assigned with the = operator, with the variable on the left hand side and
the expression to be evaluated on the right.
4. Variables can, but do not need, to be declared before assignment.
5. Variables in PHP do not have intrinsic type – a variable does not know in advance
whether it will be used to store a number or a string of characters.
6. Variables used before they are assigned have default values.
7. PHP does a good job of automatically converting types from one to another when
necessary.

4.5 PHP DATA TYPES

There are three (3) data types in PHP

1. Simple or scalar data types


a. Integers: are whole numbers, without a decimal point, like 4195.
b. Doubles: are floating-point numbers, like 3.14159 or 49.1.
c. Booleans: have only two possible values either true or false.
d. Strings: are sequences of characters, like 'PHP supports string operations’.
2. Compound data types
a. Objects: An object is a data type which stores data and information on how to
process that data. First we must declare a class of object. For this, we use the
class keyword. A class is a structure that can contain properties and methods:
Example:
<?php
class Car{
function Car(){

20
$this->model = "2.2";
$this->type = "suv";
}
}
$camry = new Car();

echo $camry->model;
echo $camry->type;
?>

b. Arrays: are named and indexed collections of other values. An array stores
multiple values in one single variable.
Example:
<? php
$names = array("Chukwudum", "Ifechukwu", "Favour");
echo($names);
?>
3. Special data types
 Resources: are special variables that hold references to resources external to
PHP (such as database connections).
 NULL: is a special type that only has one value: NULL.

4.6 PHP OPERATORS

PHP language supports the following type of operators.

1. Arithmetic Operators
Example:
-$a => Negation => Opposite of $a.
$a + $b => Addition => Sum of $a and $b.
$a - $b => Subtraction => Difference of $a and $b.
$a * $b => Multiplication => Product of $a and $b.
$a / $b => Division => Quotient of $a and $b.
$a % $b => Modulus => Remainder of $a divided by $b.
$a**$b=> Result of raising $a to the $b'th power.
21
2. Increment/Decrement Operators
Example:

++$a => Pre-increment => Increments $a by one, then returns $a.


$a++ => Post-increment => returns $a, then increments $a by one.
--$a => Pre-decrement => decrements $a by one, then returns $a.
$a-- => Post-decrement => returns $a, then decrements $a by one.

3. Comparison Operators
Example:
$a == $b => Equal
$a === $b => Identical
$a != $b => Not equal
$a !== $b => Not identical
$a < $b => Less than
$a > $b => Greater than
$a <= $b => Less than or equal to
$a >= $b => Greater than or equal to

4. Logical or Relational Operators


Example:
$a and $b => AND =>TRUE if both $a and $b are TRUE.
$a or $b => OR =>TRUE if either $a or $b is TRUE.
$a xor $b => XOR => TRUE if either $a or $b is TRUE, but not both.
! $a => NOT TRUE => TRUE if $a is not TRUE.
$a && $b => AND => And TRUE if both $a and $b are TRUE.
$a || $b => Or => TRUE if either $a or $b is TRUE.

5. Assignment Operators
Example:
$a=$b => $a=$b $a is equal to $b
$a + =$b =>$a=$a+$b $a is Sum of $a and $b.

22
$a - =$b =>$a=$a-$b $a is Difference of $a and $b.
$a *=$b =>$a=$a*$b $a is Product of $a and $b.
$a /=$b =>$a=$a/$b $a is quotient of $a and $b.
$a %=$b =>$a=$a%$b $a is Modulus of $a and $b.

6. Conditional Operators

4.7 PHP FUNCTION

A function In PHP can be:

1. Built-in
2. User defined

however they are both called the same way.

4.7.1 BUILT-IN PHP FUNCTION

1. String Functions
 strlen :counts the no of characters including space.
$result = "obi is a boy.";
echo strlen($result);
 substr :reduces the no of characters to displaced
$result = "obi is a boy";
echo substr($result,0,3);
 str_split :converts the value of the variable to array
$result = "obi is a boy";
$a= str_split($result,3);
print_r($a);
 ucfirst :converts the first character of the value to capital letter
$result = "fight daily";
echo ucfirst($result);
 ucwords :converts the first character of each word to capital letter
$result = "obi";
echo ucwords($result);
 strtolower :converts the letters in capital to small letters

23
$result= "DAILY";
echo strtolower($result);
 strtoupper :converts everything to capital
$result = "daily";
echo strtoupper($result);
 strpos :shows the position number of a letter in a variable. It starts counting
from "0‘
$result = "obtexdt";
echo strpos($result,"t");

2. Math Functions
3. String Concatenation Functions
4. Include Functions
5. Date Functions

4.7.2 USER DEFINED FUNCTIONS

1. Function Definition
2. Function Argument
3. Returning Values
4. Variable Functions

4.8 MYSQL

MySQL is one of the most recognizable technologies in the modern big data ecosystem.
Often called the most popular database and currently enjoying widespread, effective use
regardless of industry, it’s clear that anyone involved with enterprise data or general IT
should at least aim for a basic familiarity of MySQL.

With MySQL, even those new to relational systems can immediately build fast, powerful, and
secure data storage systems. MySQL’s programmatic syntax and interfaces are also perfect
gateways into the wide world of other popular query languages and structured data stores.

4.8.1 WHAT IS MYSQL?

MySQL is a relational database management system (RDBMS) developed by Oracle that is


based on structured query language (SQL). MySQL is integral to many of the most popular

24
software stacks for building and maintaining everything from customer-facing web
applications to powerful services. Its opensource nature, stability, and rich feature set, paired
with ongoing development and support from Oracle, have meant that internet-critical
organizations such as Facebook, Twitter, Wikipedia, and YouTube all employ MySQL
backends.

4.8.2 XAMPP

Xampp Server: XAMPP is a free and open-source cross-platform web server solution stack
package developed by Apache Friends, consisting mainly of the Apache HTTP Server,
MariaDB database, and interpreters for scripts written in the PHP and Perl programming
languages.

4.8.3 PHPMYADMIN

PhpMyAdmin is a free software tool written in PHP, intended to handle the administration
of MySQL over the Web. phpMyAdmin supports a wide range of operations on MySQL and
MariaDB. Frequently used operations (managing databases, tables, columns, relations,
indexes, users, permissions, etc.) can be performed via the user interface, while you still have
the ability to directly execute any SQL statement.

25
Fig. 4.8.3.1 PhpMyAdmin

26
4.8.4 CONNECTING PHP TO MYSQL

<?php

$servername = "localhost";

$username = "root";

$password = "";

// Create connection

$conn = new mysqli($servername, $username, $password);

// Check connection

if ($conn->connect_error) {

die("Connection failed: " . $conn->connect_error);

Page name = connect.php

<?php

$host = “localhost”;

$username = “root”;

$password = ‘’”;

$databasename = “database_name”;

$con = mysqli_connect($host,$username,$password) or header("location:index.html");

if(mysqli_select_db($conn, $databasename)){}else { header("location:index.html");

?>

4.8.5 CREATING A DATABASE


27
$sql = "CREATE DATABASE myDB";

if ($conn->query($sql) === TRUE) {

echo "Database created successfully";

} else {

echo "Error creating database: " . $conn->error;

4.8.6 CREATING MYSQL TABLE USING MYSQLI

The CREATE TABLE statement is used to create a table in MySQL.

CREATE TABLE MyGuests ( id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY


KEY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, email
VARCHAR(50), reg_date TIMESTAMP)

4.8.7 INSERTING OF DATA INTO MYSQL USING MYSQLI

<?php
require_once "connect.php";
if (!$conn) {
die('Could not connect: ' . mysqli_error());
}

$firstname = mysqli_real_escape_string($conn,$_POST['firstname']);
$middlename =mysqli_real_escape_string($conn,$_POST['middlename']);
$surname =mysqli_real_escape_string($conn,$_POST['surname']);

$day = $_POST["day"];
$month = $_POST["month"];
$year = $_POST["year"];
$date_of_birth =$day."/".$month."/".$year;
$date=mysqli_real_escape_string($conn,$_POST['date']);
$feedback=mysqli_real_escape_string($conn,$_POST['feedback']);
$phone=mysqli_real_escape_string($conn,$_POST['phone']);

$picture_ref = basename($_FILES["picture_ref"]["name"]);{
$target_path = "images/";
$target_path = $target_path . basename( $_FILES["picture_ref"]["name"]);
if(move_uploaded_file($_FILES['picture_ref']['tmp_name'], $target_path) )
}
mysqli_select_db($conn,"beni");

28
mysqli_select_db($conn,"beni");
$sql="INSERT INTO studentinfom(firstname, middlename,surname,date_of_birth,feedback,
phone,picture_ref) VALUES ('$firstname','$middlename','$surname','$date_of_birth',
'$feedback','$phone','$picture_ref')";
if (!mysqli_query($conn,$sql))
{
die('Error: ' . mysqli_error());
} else {
echo "Your Form has been successfully Submitted----Thanks!";
}
mysqli_close($conn);
?>

4.8.8 SELECTING DATA FROM A MYSQL DATABASE


The SELECT statement is used to select data from one or more tables:
SELECT column_name(s) FROM table_name or we can use the * character to select ALL columns
from a table: SELECT * FROM table_name

4.8.9 DELETING DATA FROM A MYSQL TABLE USING MYSQLI

The DELETE statement is used to delete records from a table:

DELETE FROM table_name WHERE some_column = some_value

<?php

$host = "localhost";

$user = "root";

$password = "";

$conn = mysqli_connect("$host","$user","$password") or die ("Could not connect to


database");

$selected = mysqli_select_db($conn,"beni") or die("Could not select beni");

Echo;

$id_del=$_GET["id"];

$result=mysqli_query($conn,"DELETE FROM studentinfom WHERE id='$id_del'");

if ($result) {

29
echo "The selected user has been successfully Deleted----Thanks!";

die(); }

mysqli_close($conn);

?>

30
PROJECT CREATED

Online Hotel Management System

PLATE 1: SCREENSHOT OF WEBSITE CREATED

31
32
PLATE 2: SCREENSHOT OF SAMPLE CODE

33
PLATE 3: SCREENSHOT OF SAMPLE CODE

CHAPTER FIVE

34
CONCLUSION

5.1 RELEVANCE OF THE INDUSTRIAL TRAINING TO THE


TRAINEE’S COURSE OF STUDY
The Student Industrial Work Experience Scheme (SIWES) offered me the opportunity to
witness the practical of what I have been studying in school in respect to Web Design and
Development. SIWES has given me a better and broader understanding of Computer Science.

My Industrial Training Experience at DIGITAL DREAM LIMITED in Awka was very


helpful, it really exposed me to a lot of things that I never thought existed. I gained massive
knowledge during the experience. I learnt how to develop and design websites. Now, I can
confidently say that I am a programmer.

In conclusion, I want to use this medium to commend the Federal Government of Nigeria,
National University Commission (NUC), Students Industrial Work Experience Scheme
(SIWES) unit for their support which is geared towards making students to obtain the
relevant industrial-based training and work experience necessary in their chosen professions
before leaving the higher institution. SIWES helps students and members of the academic
community to effectively utilize the resources of the industrial training experience.

5.2 PROBLEMS AND CHALLENGES ENCOUNTERED DURING


INDUSTRIAL TRAINING
 Difficulty in seeking for IT attachment: Some companies or industries don’t tend to
accept students into their organization thereby making it difficult for students to find a
place of attachment in good time.
 Lack of Transportation Fee: Transportation from place of attachment and back
home takes quite a lot from our pockets each day. It was a challenge as a result of not
being paid during attachment.
 Unavailability of working internet: Internet in computing has helped to make some
works and discovery quite easier and faster. The internet available in the company due
to mismanagement was kept private and not always released for easy access for
personal use other than organizational purpose. This poses as a problem which was
resolved by using personal mobile data which helped to some extent.
5.3 SUGGESTION FOR IMPROVED SIWES PROGRAMME

35
I suggest that schools involved in the students industrial work experience scheme (SIWES)
should continue to encourage and give more support to the students so as to enable them
acquire the necessary knowledge and skills required for their various professions.

I also suggest that industries should have industry-based IT coordinator who sees to it that
students get the best of training relevant in their course of study. The IT coordinator should
also ensure that students are allowed to use the resources of the industry.

Finally, I suggest that the university system should encourage industries and the societies at
large to accept students embarking on industrial attachment.

36

You might also like