You are on page 1of 37

CHAPTER ONE

INTRODUCTION TO SIWES

The student Industrial Work Experience Scheme (SIWES) is a six months

program organized by the higher institutions to aid students to develop their skills. The

motive of this program is to bridge the gap between the university theory work and the actual

practice, especially natural sciences and other professional education program. The student

industrial work experience scheme is designed to give students opportunity to acquire work

experience as undergraduates as an essential part of the award of B.Sc.

1.1 Aims and Objectives of SIWES

The major aims and objectives of SIWES are:

Provide an avenue for students in the Nigerian Universities to acquire

industrial skills and experience in their course of study.

1. To get students ready for working condition that they may likely

encounter after graduation.

2. To make students to more familiar with the work methods and

techniques in handling equipment’s and machinery that may not be

available in the university.

3. To aid students to establish contacts for later job placement.

4. To provide students with an opportunity to apply their theoretical

knowledge in real work situation, there by bridging the gap between

university work and actual practice of preparing university graduates for

employment in companies and establishments.

1
1.2 The Role of the Student and the Institution

The role of the student is to partake in the program in such a way that he/she will achieve

maximum benefit from the program. The student is advised to ask

questions, be submissive, and adhere to all the rules and regulations of the

organization where he is attached. Identification of placement opportunities,

funding of SIWES supervisors and assessment of the student are some of the roles played by

the institutions to ensure smooth running of the program.

2
CHAPTER TWO
GENERAL OVERVIEW OF THE ORGANISATION OF ATTACHMENT
2.1 INTRODUCTION

Bidabyt Technologies is a computer firm that is located at Presco campus Abakaliki. The

firm is owned and managed by Mbam Ozichukwu Smart. who established the organization in

the year 20018. Seeing the need for computer literacy in the state he decided to establish the

organization to help secondary school students before expanding to teaching adult individuals

and also web designing and also hardware repair and sales of computer accessories. The

company’s website is www.bidabyt.com.

2.2 ORGANIZATIONAL STRUCTURE OF BIDABYT TECHNOLOGIES

BIDABYT TECNOLOGIES

CEO/MD

SOFTWARE ENGINEER COMPUTER TUTOR SALES MANAGER HARDWARE ENGINEER

SOFTWARE SOFTWARE HARDWARE HARDWARE


ENGINEER 2 TUTOR TUTOR ENGINEER 2

IT
STUDENTS

3
CHAPTER THREE

SKILLS AND KNOWLEDGE ACQUIRED AT SIWES WORK PLACE

Web Development using PHP

3.1 Hypertext Markup Language

HTML is a markup language for describing web documents (web pages).

a. HTML stands for Hyper Text Markup Language

b. A markup language is a set of markup tags

c. HTML documents are described by HTML tags

d. Each HTML tag describes different document content

HTML Example

A small HTML document:

<!DOCTYPE html>

<html>

<head>

<title>Page Title</title>

</head>

<body>

<h1>My First Heading</h1>

<p>My first paragraph.</p>

</body>

</html>

Example Explanation;

i. The DOCTYPE declaration defines the document type to be HTML

ii. The text between <html> and </html> describes an HTML document

iii. The text between <head> and </head> provides information about the document

4
iv. The text between <title> and </title> provides a title for the document

v. The text between <body> and </body> describes the visible page content

vi. The text between <h1> and </h1> describes a heading

vii. The text between <p> and </p> describes a paragraph

Using this description, a web browser can display a document with a heading and a

paragraph.

HTML Tags

HTML tags are keywords (tag names) surrounded by angle brackets:

<tagname>content</tagname>

a. HTML tags normally come in pairs like <p> and </p>

b. The first tag in a pair is the start tag, the second tag is the end tag

c. The end tag is written like the start tag, but with a slash before the tag name

Web Browsers

The purpose of a web browser (Chrome, IE, Firefox, Safari) is to read HTML documents and

display them. The browser does not display the HTML tags, but uses them to determine how

to display the document:

5
3.1.1 HTML Page Structure

Below is a visualization of an HTML page structure:

6
The <!DOCTYPE> Declaration

The <!DOCTYPE> declaration helps the browser to display a web page correctly.

There are different document types on the web.

To display a document correctly, the browser must know both type and version.

The doctype declaration is not case sensitive. All cases are acceptable:

<!DOCTYPE html>

<!DOCTYPE HTML>

<!doctype html>

<!Doctype Html>

3.1.2 Write HTML Using Notepad or TextEdit

HTML can be edited by using professional HTML editors like:

a. Microsoft WebMatrix

b. Sublime Text

However, for learning HTML a text editor like Notepad (PC) or TextEdit (Mac) is

recommended. Using a simple text editor is a good way to learn HTML. Follow the 4 steps

below to create a web page with Notepad.

Step 1: Open Notepad

To open Notepad in Windows 7 or earlier; Click Start (bottom left on your screen). Click All

Programs. Click Accessories. Click Notepad.

To open Notepad in Windows 8 or later; Open the Start Screen (the window symbol at the

bottom left on your screen). Type Notepad.

Step 2: Write Some HTML

Write or copy some HTML into Notepad;

<!DOCTYPE html>

7
<html>

<body>

<h1>My First Heading</h1>

<p>My first paragraph.</p>

</body>

</html>

Step 3: Save the HTML Page

Save the file on your computer. Select File > Save as in the Notepad menu. Name the file

"index.html" or any other name ending with html or htm. UTF-8 is the preferred encoding for

HTML files. ANSI encoding covers US and Western European characters only.

8
Step 4: View HTML Page in Your Browser

Open the saved HTML file in your favourite browser. The result will look much like this:

3.1.3 HTML Elements

HTML elements are written with a start tag, with an end tag, with the content in between:

<tagname>content</tagname>

The HTML element is everything from the start tag to the end tag:

<p>My first HTML paragraph.</p>

Start tag Element content End tag

<h1> My First Heading </h1>

<p> My first paragraph. </p>

<br>

9
3.1.4 HTML Attributes

a. HTML elements can have attributes

b. Attributes provide additional information about an element

c. Attributes are always specified in the start tag

d. Attributes come in name/value pairs like: name="value"

The lang Attribute

The document language can be declared in the <html> tag. The language is declared in the

lang attribute. Declaring a language is important for accessibility applications (screen

readers) and search engines:

<!DOCTYPE html>

<html lang="en-US">

<body>

<h1>My First Heading</h1>

<p>My first paragraph.</p>

</body>

</html>

The first two letters specify the language (en). If there is a dialect, use two more letters (US).

The title Attribute

HTML paragraphs are defined with the <p> tag. In this example, the <p> element has a title

attribute. The value of the attribute is "My IT Experience":

Example;

<p title="My IT Experience ">

Too engaging and wonderful,

I learned a whole lot of things

10
</p>

The href Attribute

HTML links are defined with the <a> tag. The link address is specified in the href attribute:

Example;<a href="http://portal.ebsu-edu.net">This is a link</a>

Size Attributes

HTML images are defined with the <img> tag. The filename of the source (src), and the size

of the image (width and height) are all provided as attributes:

Example;<img src="myself.jpg" width="104" height="142">

The image size is specified in pixels: width="104" means 104 screen pixels wide.

3.1.5 HTML Headings

Headings are defined with the <h1> to <h6> tags. <h1> defines the most important heading.

<h6> defines the least important heading.

Example;

<h1>This is a heading</h1>

<h2>This is a heading</h2>

<h3>This is a heading</h3>

Browsers automatically add some empty space (a margin) before and after each heading.Use

HTML headings for headings only. Don't use headings to make text Big or bold.Search

engines use your headings to index the structure and content of your web pages.Users skim

your pages by its headings. It is important to use headings to show the document structure.h1

headings should be main headings, followed by h2 headings, then the less important h3, and

so on.

11
The HTML <head> Element

The HTML <head> element has nothing to do with HTML headings. The HTML <head>

element contains meta data. Meta data are not displayed. The HTML <head> element is

placed between the <html> tag and the <body> tag:

Example;

<!DOCTYPE html>

<html>

<head>

<title>My First HTML</title>

<meta charset="UTF-8">

</head>

<body>

The HTML <title> Element

The HTML <title> element is meta data. It defines the HTML document's title. The title will

not be displayed in the document, but might be displayed in the browser tab.

The HTML <meta> Element

The HTML <meta> element is also meta data. It can be used to define the character set, and

other information about the HTML document.

3.1.6 HTML Links - Hyperlinks

HTML links are hyperlinks. A hyperlink is a text or an image you can click on, and jump to

another document.

HTML Links - Syntax

In HTML, links are defined with the <a> tag: <a href="url">link text</a>

Example;<a href="http://portal.ebsu-edu.net">EBSU official site</a>

12
The href attribute specifies the destination address (http://portal.ebsu-edu.net)

The link text is the visible part (EBSU official site). Clicking on the link text, will send you to

the specified address.

3.1.7 The <form> Element

HTML forms are used to collect user input. The <form> element defines an HTML form:

<form>

form elements

</form>

HTML forms contain form elements. Form elements are different types of input elements,

checkboxes, radio buttons, submit buttons, and more.

The <input> Element

The <input> element is the most important form element. The <input> element has many

variations, depending on the type attribute.

Text Input: <input type="text"> defines a one-line input field for text input:

Example;

<form>

First name:<br>

<input type="text" name="firstname">

<br>

Last name:<br>

<input type="text" name="lastname">

</form>

13
This is how it will look like in a browser:

First name:

Last name:

The form itself is not visible. Also note that the default width of a text field is 20 characters.

Radio Button Input

<input type="radio"> defines a radio button. Radio buttons let a user select ONE of a limited

number of choices:

Example;

<form>

<input type="radio" name="sex" value="male" checked>Male

<br>

<input type="radio" name="sex" value="female">Female

</form>

This is how the HTML code above will be displayed in a browser:

Male

Female

The Submit Button

<input type="submit"> defines a button for submitting a form to a form-handler. The form-

handler is typically a server page with a script for processing input data. The form-handler is

specified in the form's action attribute:

Example;

<form action="action_page.php">

14
First name:<br>

<input type="text" name="firstname" value="Okorie">

<br>

Last name:<br>

<input type="text" name="lastname" value="Chijioke">

<br><br>

<input type="submit" value="Submit">

</form>

This is how the HTML code above will be displayed in a browser:

First name:

OKorie

Last name:

Chijioke

The Action Attribute

The action attribute defines the action to be performed when the form is submitted.The

common way to submit a form to a server, is by using a submit button. Normally, the form is

submitted to a web page on a web server. In the example above, a server-side script is

specified to handle the submitted form: <form action="action_page.php">. If the action

attribute is omitted, the action is set to the current page.

The Method Attribute

The method attribute specifies the HTTP method (GET or POST) to be used when submitting

the forms: <form action="action_page.php" method="get"> or: <form

action="action_page.php" method="post">

15
3.2 CSS

a. CSS stands for Cascading Style Sheets

b. CSS describes how HTML elements are to be displayed on screen, paper, or in other

media

c. CSS saves a lot of work. It can control the layout of multiple web pages all at once

d. External stylesheets are stored in CSS files

Why Use CSS?

CSS is used to define styles for your web pages, including the design, layout and variations in

display for different devices and screen sizes. 

CSS Solved a Big Problem

HTML was NEVER intended to contain tags for formatting a web page! HTML was created

to describe the content of a web page, like:

<h1>This is a heading</h1>

<p>This is a paragraph.</p>

When tags like <font>, and color attributes were added to the HTML 3.2 specification, it

started a nightmare for web developers. Development of large websites, where fonts and

color information were added to every single page, became a long and expensive process.

To solve this problem, the World Wide Web Consortium (W3C) created CSS. CSS removed

the style formatting from the HTML page!

CSS Saves a Lot of Work!

The style definitions are normally saved in external .css files. With an external stylesheet file,

you can change the look of an entire website by changing just one file!

3.2.1 CSS Syntax

A CSS rule-set consists of a selector and a declaration block:

16
The selector points to the HTML element you want to style. The declaration block contains

one or more declarations separated by semicolons. Each declaration includes a CSS property

name and a value, separated by a colon. A CSS declaration always ends with a semicolon,

and declaration blocks are surrounded by curly braces. In the following example all <p>

elements will be center-aligned, with a red text color:

Example;

p{

color: red;

text-align: center;

CSS Comments

Comments are used to explain the code, and may help when you edit the source code at a

later date. Comments are ignored by browsers.A CSS comment starts with /* and ends with

*/. Comments can also span multiple lines:

Example;

p{

color: red;

/* This is a single-line comment */

text-align: center;

17
/* This is

a multi-line

comment */

3.2.2 CSS Selectors

CSS selectors are used to "find" (or select) HTML elements based on their element name, id,

class, attribute, and more.

The element Selector

The element selector selects elements based on the element name. You can select all <p>

elements on a page like this (in this case, all <p> elements will be center-aligned, with a red

text color):

Example;

p{

text-align: center;

color: red;

The id Selector

The id selector uses the id attribute of an HTML element to select a specific element. An id

should be unique within a page, so the id selector is used if you want to select a single,

unique element. To select an element with a specific id, write a hash (#) character, followed

by the id of the element. The style rule below will be applied to the HTML element with

id="para1":

Example;

#para1 {

text-align: center;

18
color: red;

The class Selector

The class selector selects elements with a specific class attribute. To select elements with a

specific class, write a period (.) character, followed by the name of the class. In the example

below, all HTML elements with class="center" will be red and center-aligned:

Example;

.center {

text-align: center;

color: red;

You can also specify that only specific HTML elements should be affected by a class. In the

example below, all <p> elements with class="center" will be center-aligned:

Example;

p.center {

text-align: center;

color: red;

3.2.3 Three Ways to Insert CSS

There are three ways of inserting a style sheet:

a. External style sheet

b. Internal style sheet

c. Inline style

19
External Style Sheet

With an external style sheet, you can change the look of an entire website by changing just

one file. Each page must include a reference to the external style sheet file inside the <link>

element. The <link> element goes inside the <head> section:

Example;

<head>

<link rel="stylesheet" type="text/css" href="mystyle.css">

</head>

An external style sheet can be written in any text editor. The file should not contain any html

tags. The style sheet file must be saved with a .css extension. Here is how the "myStyle.css"

looks:

body {

background-color: lightblue;

h1 {

color: navy;

margin-left: 20px;

Here is how the "myStyle.css" looks:

body {

background-color: lightblue;

h1 {

20
color: navy;

margin-left: 20px;

Internal Style Sheet

An internal style sheet may be used if one single page has a unique style. Internal styles are

defined within the <style> element, inside the <head> section of an HTML page:

Example;

<head>

<style>

body {

background-color: linen;

h1 {

color: maroon;

margin-left: 40px;

</style>

</head>

Inline Styles

An inline style may be used to apply a unique style for a single element. To use inline styles,

add the style attribute to the relevant element. The style attribute can contain any CSS

property. The example below shows how to change the color and the left margin of a <h1>

element:

Example;<h1 style="color:blue;margin-left:30px;">This is a heading.</h1>

Multiple Style Sheets

21
If some properties have been defined for the same selector (element) in different style sheets,

the value from the last read style sheet will be used. 

Example;Assume that an external style sheet has the following style for the <h1> element:

h1 {

color: navy;

Then, assume that an internal style sheet also has the following style for the <h1> element:

h1 {

color: orange;   

If the internal style is defined after the link to the external style sheet, the <h1> elements will

be "orange":

Example;

<head>

<link rel="stylesheet" type="text/css" href="mystyle.css">

<style>

h1 {

color: orange;

</style>

</head>

However, if the internal style is defined before the link to the external style sheet, the <h1>

elements will be "navy":

Example;

<head>

22
<style>

h1 {

color: orange;

</style>

<link rel="stylesheet" type="text/css" href="mystyle.css">

</head>

23
3.3 PHP

PHP set its roots in 1995, when an independent software development contractor named

Rasmus Lerdorf developed a Perl/CGI script that enabled him to know how many visitors

were reading his online resume. His script performed two duties: logging visitor information

and displaying the count of visitors to the Web page. Because the WWW as we know it today

was still so young at that time, tools such as these were nonexistent, and they prompted

emails inquiring about Lerdorf’s scripts. Lerdorf thus began giving away his toolset, dubbed

Personal HomePage (PHP), or Hypertext Preprocessor.

The clamor for the PHP toolset prompted Lerdorf to begin developing additions to PHP, one

of which converted data entered in an HTML form into symbolic variables that allowed for

their export to other systems. To accomplish this, he opted to continue development in C

code rather than Perl. This addition to the existing PHP toolset resulted in PHP 2.0, or PHP-

FI (Personal Home Page—Form Interpreter). This 2.0 release was accompanied by a number

of enhancements and improvements from programmers worldwide. The new PHP release was

extremely popular, and a core team of developers soon formed. They kept the original

concept of incorporating code directly alongside HTML and rewrote the parsing engine,

giving birth to PHP 3.0. By the 1997 release of version 3.0, over 50,000 users were using

PHP to enhance their Web pages.

3.3.1 Variables and Data Types

Data types form the backbone of any programming language, providing the programmer with

a means by which to represent various types of information. PHP provides support for six

general data types:

1. Integers

2. Floating-point numbers

3. Strings

24
4. Objects

5. Booleans

3.3.2 Expressions, Operators, and Control Structures

Expressions

An expressionis essentially a phrase representing a particular action in a program. All

expressions consists of at least one operand and one or more operators. Before delving into a

few examples illustrating the use of expressions, an introduction of operands and operators is

in order.

Operands

An operandis one of the entities being manipulated in an expression. Valid operands can be

of any data type. You are probably already familiar with the manipulation and use of

operands not only through everyday mathematical calculations, but also through prior

programming experience. Some examples of operands follow:

$a++; // $a is the operand

$sum = $val1 + val2; // $sum, $val1 and $val2 are operands

Operators

An operator is a symbol that specifies a particular action in an expression. Many operators

may be familiar to you. Regardless, it is important to remember that PHP’s automatic type

conversion will convert types based on the type of operator placed between the two operands,

which is not always the case in other programming languages.

25
Operator Precedence

jbOperator precedence is a characteristic of operators that determines the order in which they

will evaluate the operands surrounding them. PHP follows the standard precedence rules used

in elementary school math class. Examples:

$total_cost = $cost + $cost * 0.06;

is the same as writing:

$total_cost = $cost + ($cost * 0.06);

This is because the multiplication operator has higher precedence than that of the addition

operator.

26
3.3.3 Control Structures

Control structures provide programmers with the tools to build complex programs capable of

evaluating and reacting to the changing values of various inputs throughout the execution of a

program. In summary, these structures control the execution of a program.

True/False Evaluation

Control structures generally evaluate expressions in terms of true and false. A particular

action will occur based on the outcome of this evaluation. Consider the comparative

expression $a = $b. This expression will evaluate to true if $a in fact is equal to $b, and false

otherwise. More specifically, the expression will evaluate to the value 1 if it is true, and 0 if it

is false. Consider the following:

$a = 5;

$b = 5;

print $a == $b;

This would result in 1 being displayed. Changing $a or $b to a value other than 5 would

result in 0 being displayed.

The if

The if statement is a type of selection statement that evaluates an expression and will (or will

not) execute a block of code based on the truth or falsehood of the expression. There are two

general forms of the if statement:

if (expression) {

statement block

And

if (expression) {

statement block

27
}

else {

statement block

The elseif

The elseif statement provides another level of evaluation for the if control structure, adding

depth to the number of expressions that can be evaluated:

if (expression) {

statement block

elseif (expression) {

statement block

The while

The while structure provides a way to repetitively loop through a statement block. The

number of times the statement block is executed depends on the total times the expression

evaluates to true. The general form of the while loop is:

while (expression):

statement block

endwhile;

An example of the computation of n-factorial (n!), where n = 5:

$n = 5;

$ncopy = $n;

$factorial = 1; // set initial factorial value

while ($n > 0) :

28
$factorial = $n * $factorial;

$n—; // decrement $n by 1

endwhile;

print "The factorial of $ncopy is $factorial.";

The do..while

A do..while structure works in much the same way as the while structure presented in the

previous section, except that the expression is evaluated at the end of each iteration. It is

important to note that a do..while loop will always execute at least once, whereas a while

loop might not execute at all if the condition is first evaluated before entering the loop.

do :

statement block

while (expression);

The previous n-factorial example, this time using the do..while construct:

$n = 5;

$ncopy = $n;

$factorial = 1; // set initial factorial value

do {

$factorial = $n * $factorial;

$n—; // decrement $n by 1

} while ($n > 0);

print "The factorial of $ncopy is $factorial.";

The for

The for loop is simply an alternative means for specifying the duration of iterative loops. It

differs from the while loop only in the fact that the iterative value is updated in the statement

29
itself instead of from somewhere in the statement block. As is the case with the while loop,

the looping will continue as long as the condition being evaluated holds true. The general

form of the for construct is:

for (initialization; condition; increment) {

statement block

Three components actually make up the conditional. The initialization is considered only

once, used to assign the initial value of the loop control variable. The condition is considered

at the start of every repetition and will determine whether or not the next repetition will

occur. Finally, the increment determines how the loop control variable changes with each

iteration. Use of the term increment is perhaps misleading because the variable could be

either incremented or decremented in accordance with the programmer’s intentions. This

example illustrates the basic usage of the for loop:

for ($i = 10; $i <= 100; $i+=10) :

print "\$i = $i <br>"; // escaping backslash to suppress

// conversion of $i variable.

endfor;

3.3.4 PHP’s Predefined MySQL Functions

Once you have created and successfully tested the necessary permissions, you are ready to

begin using the MySQL server. The predefined MySQL functions, enable you to easily

interface your PHP scripts with a MySQL server. Here is the general order of events that take

place during the MySQL server communications process:

1. Establish a connection with the MySQL server. If the connection attempt fails, display

an appropriate message and exit process.

30
2. Select a database on the MySQL server. If you cannot select the database, display an

appropriate message and exit process. It’s possible to simultaneously have several

databases open for querying.

3. Perform necessary queries on selected database(s).

4. Once the querying is complete, close the database server connection.

mysql_connect()

The function mysql_connect() is used to establish an initial connection with the MySQL

server. Once a successful connection is established, a database residing on that server can be

selected. The syntax is:

int mysql_connect([string hostname [:port] [:/path/to/socket] [, string username] [, string

password]);

mysql_select_db()

Once a successful connection is established with the MySQL server, a database residing on

that server can be selected. This is accomplished with mysql_select_db(). Its syntax is:

int mysql_select_db (string database_name [, int link_id])

mysql_close()

Once you have finished querying the MySQL server, you should close the connection. The

function mysql_close() will close the connection corresponding to the optional input

parameter link_id. If the link_id input parameter is not specified, mysql_close() will close the

most recently opened link. The syntax is:

int mysql_close ([int link_id])

An example of mysql_close() follows:

<?

@mysql_connect("localhost", "web", "4tf9zzzf") or die("Could not connect to MySQL

server!");

31
@mysql_select_db("company") or die("Could not select company database!");

print "You're connected to a MySQL database!";

mysql_close();

?>

mysql_query()

The function mysql_query() provides the functional interface from which a database can be

queried. Its syntax is:

int mysql_query (string query [, int link_id])

mysql_affected_rows()

It is often useful to return the number of rows affected by an SQL query involving an

INSERT, UPDATE, REPLACE, or DELETE. This is accomplished with the function

mysql_affected_rows(). Its syntax is:

int mysql_affected_rows ([int link_id])

mysql_num_rows()

The function mysql_num_rows() is used to determine the number of rows returned from a

SELECT query statement. Its syntax is:

int mysql_num_rows (int result)

mysql_result()

The function mysql_result() is used in conjunction with mysql_query() (when a SELECT

query is involved) to produce a data set. Its syntax is:

int mysql_result (int result_id, int row [, mixed field])

mysql_fetch_row()

It is typically much more convenient to simultaneously assign an entire row to an indexed

array (starting at offset 0), rather than make multiple calls to mysql_result() to assign column

values. This is accomplished with mysql_fetch_row() Its syntax is:

32
array mysql_fetch_row() (int result)

mysql_fetch_array()

The function mysql_fetch_array() accomplishes the same result as mysql_fetch_row(), except

that by default it assigns a returned row to an associative array. However, you can specify the

type of array mapping (associative, numerically indexed, or both). The syntax is:

array mysql_fetch_array (int result [, result_type])

33
3.4 MySQL

MySQL is a robust SQL database server developed and maintained by T.c.X DataKonsultAB

of Stockholm, Sweden. Publically available since 1995, MySQL has risen to become one of

the most popular database servers in the world, this popularity due in part to the server’s

speed, robustness, and flexible licensing policy. Given the merits of MySQL’s characteristics,

coupled with a vast and extremely easy-to-use set of predefined interfacing functions,

MySQL has arguably become PHP’s most-popular database counterpart.

3.4.1 Creating MySQL Database using PHPMyAdmin

phpMyAdmin is a web-based interface to a MySQL server. The interface is written in the

PHP language, which is frequently used for web-based interactive programs. phpMyAdmin

translates what you enter into the web browser, sends queries to the MySQL database, and

translates the returned information back to web format.

To access phpMyAdmin and your database:

1.Start your servers. This can be done from the MAMP/WAMP application that you installed.

On some systems there may also be an application icon that can be used.

2.Open the start or home page with the same application. You can also find this

page simply by opening a web browser and entering the address http://localhost:8888/

3.Start phpMyAdmin from the Tools menu on the localhost web page

34
Import Data

Create Database: You can create new databases and import tables using phpMyAdmin.

Create a database by clicking on the “New” link at the top of the left panel, or navigate to the

Databases tab. Enter a name for your new database (e.g., “G563”) and select a “collation”,

which is the encoding format used to store text characters. The collation can be important for

storing characters like vowels with umlauts or accents. When in doubt, chose

“utf8_unicode_ci”, which will handle most characters from European alphabets. Create or

Import Table: You can create tables that you fill with new data, or you can import

existing tables of data. Here is one way to import existing data from a file:

1. Clean the data, including the column labels, and save in CSV format (comma-delimited

text file). Labels should be at the top of each column. Things will go easier if the labels are

short, have no spaces, and have no unusual characters (e.g., -, =, %, &, Ä, etc.). Labels should

start with a letter, not a number. You can save CSV from Excel, or you can create a CSV file

in a text editor or word processor.

35
2. In phpMyAdmin, select the database into which you want to import the table.

3. Using the import tab in phpMyAdmin, enter the name of the file using the file dialog

button.

4. Under “format” chose CSV, make sure column separators is set to comma (presuming you

are importing a comma delimited file.), and make sure to tick the option that reads column

headers.

5. Note the “replace table data with file” option. If you tick this, the data from the imported

will overwrite all existing data in the MySQL table; if you don’t tick it, the data will be added

to whatever is in the table already. If you are importing into an empty file, this option has no

effect.

6. Press Go when you are ready.

7. Change the name of the table to something useful. First, select it in

phpMyAdmin, choose the Operations tab, and enter a new name under the

Table Options section at the right.

36
CHAPTER FOUR

CONCLUSION AND RECOMMENDATION

Since the government, the institution, the industries, and the student are all

integral part of Student’s Industrial Work Experience Scheme (SIWES).

The following are hereby recommended.

The government should provide polices that will keep industries alive and

optimally functional, revitalize moribund industries and establish more industries.

Government should finance industrial training students to enable them carry

out the industrial training expenses. As part of its administrative functions,

the government should see to the security of lives and properties of this great

nation, so that the students can do the SIWES program in serene and

peaceful environment.

SIWES coordinator should see that students are released early enough from

the institution to their respective places of attachment, so as to secure the

relevant chances. And students should be provided with companies names

were IT students are accepted. This will prevent the delay and sometimes

total elimination of the proposed training. They should also create time to

visit the students in their respective places of attachment.

The management of industries should frown and condemn ethnicity and

partiality in the acceptance of students to their establishments. They should

see such acceptance as their commitment and contributions towards nation

building. They should also create a functional industrial training department

in their companies, which will see that the students are adequately exposed.

Students should be made to understand the aim and objectives of SIWES.

37

You might also like