Professional Documents
Culture Documents
INTRODUCTION TO SIWES
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
1. To get students ready for working condition that they may likely
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
questions, be submissive, and adhere to all the rules and regulations of the
funding of SIWES supervisors and assessment of the student are some of the roles played by
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
BIDABYT TECNOLOGIES
CEO/MD
IT
STUDENTS
3
CHAPTER THREE
HTML Example
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
</body>
</html>
Example Explanation;
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
Using this description, a web browser can display a document with a heading and a
paragraph.
HTML Tags
<tagname>content</tagname>
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
5
3.1.1 HTML Page Structure
6
The <!DOCTYPE> Declaration
The <!DOCTYPE> declaration helps the browser to display a web page correctly.
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>
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
To open Notepad in Windows 7 or earlier; Click Start (bottom left on your screen). Click All
To open Notepad in Windows 8 or later; Open the Start Screen (the window symbol at the
<!DOCTYPE html>
7
<html>
<body>
</body>
</html>
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:
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:
<br>
9
3.1.4 HTML Attributes
The document language can be declared in the <html> tag. The language is declared in the
<!DOCTYPE html>
<html lang="en-US">
<body>
</body>
</html>
The first two letters specify the language (en). If there is a dialect, use two more letters (US).
HTML paragraphs are defined with the <p> tag. In this example, the <p> element has a title
Example;
10
</p>
HTML links are defined with the <a> tag. The link address is specified in the href attribute:
Size Attributes
HTML images are defined with the <img> tag. The filename of the source (src), and the size
The image size is specified in pixels: width="104" means 104 screen pixels wide.
Headings are defined with the <h1> to <h6> tags. <h1> defines the most 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
Example;
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
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 is also meta data. It can be used to define the character set, and
HTML links are hyperlinks. A hyperlink is a text or an image you can click on, and jump to
another document.
In HTML, links are defined with the <a> tag: <a href="url">link text</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
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,
The <input> element is the most important form element. The <input> element has many
Text Input: <input type="text"> defines a one-line input field for text input:
Example;
<form>
First name:<br>
<br>
Last name:<br>
</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.
<input type="radio"> defines a radio button. Radio buttons let a user select ONE of a limited
number of choices:
Example;
<form>
<br>
</form>
Male
Female
<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
Example;
<form action="action_page.php">
14
First name:<br>
<br>
Last name:<br>
<br><br>
</form>
First name:
OKorie
Last name:
Chijioke
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
The method attribute specifies the HTTP method (GET or POST) to be used when submitting
action="action_page.php" method="post">
15
3.2 CSS
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
CSS is used to define styles for your web pages, including the design, layout and variations in
HTML was NEVER intended to contain tags for formatting a web page! HTML was created
<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 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!
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>
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
Example;
p{
color: red;
text-align: center;
17
/* This is
a multi-line
comment */
CSS selectors are used to "find" (or select) HTML elements based on their element name, id,
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 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;
p.center {
text-align: center;
color: red;
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>
Example;
<head>
</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;
body {
background-color: lightblue;
h1 {
20
color: navy;
margin-left: 20px;
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:
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>
<style>
h1 {
color: orange;
</style>
</head>
However, if the internal style is defined before the link to the external style sheet, the <h1>
Example;
<head>
22
<style>
h1 {
color: orange;
</style>
</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
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
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
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
1. Integers
2. Floating-point numbers
3. Strings
24
4. Objects
5. Booleans
Expressions
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
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,
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
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
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
$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
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
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
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
while (expression):
statement block
endwhile;
$n = 5;
$ncopy = $n;
28
$factorial = $n * $factorial;
$n—; // decrement $n by 1
endwhile;
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;
do {
$factorial = $n * $factorial;
$n—; // decrement $n by 1
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
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
// conversion of $i variable.
endfor;
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
1. Establish a connection with the MySQL server. If the connection attempt fails, display
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
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
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:
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
<?
server!");
31
@mysql_select_db("company") or die("Could not select company database!");
mysql_close();
?>
mysql_query()
The function mysql_query() provides the functional interface from which a database can be
mysql_affected_rows()
It is often useful to return the number of rows affected by an SQL query involving an
mysql_num_rows()
The function mysql_num_rows() is used to determine the number of rows returned from a
mysql_result()
mysql_fetch_row()
array (starting at offset 0), rather than make multiple calls to mysql_result() to assign column
32
array mysql_fetch_row() (int result)
mysql_fetch_array()
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:
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,
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
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
“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
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.
phpMyAdmin, choose the Operations tab, and enter a new name under the
36
CHAPTER FOUR
Since the government, the institution, the industries, and the student are all
The government should provide polices that will keep industries alive and
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
were IT students are accepted. This will prevent the delay and sometimes
total elimination of the proposed training. They should also create time to
in their companies, which will see that the students are adequately exposed.
37