Professional Documents
Culture Documents
TOTAL
NUMBER OF QUESTIONS you have answered in the order in which you have written them
5 3 1 2
Software such as a text editor, a virtual environment for you to work on, a web browser,
a virtual server running on your hardware such as apache.
Computer
Most modern desktops and laptops have the specifications to build a website.
The most significant computer parameter to check is the RAM size, which should be
greater than 2GB, though more is better.
Even with heavy apps like website editors or photo editors, the computer will function
quickly and smoothly as a result of this. The computer should have a keyboard and
mouse attached and working as well.
Internet
It is often necessary to have a high-speed Internet connection in order to establish a
website.
This enables you to upload the files that will make up your website to the online server
that will host it, make adjustments to your website, and view it live online to ensure that
it is functioning properly.
Server
To ensure that your website is always available for everyone wanting to access it, you'll
need a server computer to host it on.
While you can set up a computer to act as a web server, doing so is a difficult
undertaking, and purchasing a hosting package from a web hosting business is
significantly easier, more reliable, and cost-effective.
They'll look after and maintain the server's computing power.
b) In a bid to make your domain a destination online, what are the factors that will attract
people to visit your site?
Reference; https://www.forbes.com/sites/robertadams/2017/04/10/23-proven-ways-to-
drive-traffic-to-your-website/?sh=bca2c1426544.
c) Explain any two advantages and disadvantages of In-House and Out- sourced web
hosting.
Advantages of outsourcing
A company may decide to outsource a work, job, or process for a variety of reasons.
Outsourcing has a number of well-known advantages, for example:
Outsourcing can also help your company become more flexible and adaptable, allowing
it to react to changing market conditions and problems while saving money and
improving service levels.
Disadvantages of outsourcing
Outsourcing is the process of giving a third party direct control over a corporate
function or process.
As a result, it entails some dangers.
When outsourcing, for example, you may run into issues with:
References; https://www.nibusinessinfo.co.uk/content/pros-and-cons-house-hosting
Question Three
a) Explain the effect of the following four CSS style rules.
(i) h1 {text-align:center;}
This function is used to text align heading 1 to the center of the document. i.e. you center
heading 1.
(ii) body p b {color:orange;}
This sets the color of the body of p b to orange
(iii) h2.address {text-align:right; font-family:Arial;}
This aligns heading 2 to the right of the document and defines the font of that heading as
Arial.
(iv) table {border-style:dashed;}
This function makes the borders of the table appear in a dashed form.
b) What are the three levels at which CSS can be defined to specify the style of an
HTML5 document?
The three levels at which CSS can be defined to specify the style are INLINE CSS,
EXTERNAL CSS and INTERNAL or EMBEDDED CSS.
What HTML5 tags and attributes are used to accomplish this?
Inline CSS – an inline css uses the attribute ‘style ’ of an HTML element.
<!DOCTYPE html>
<html>
<body>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<style>
body {background-color: grey;}
h2 {color: black;}
p {color: blue;}
</style>
</head>
<body>
</body>
</html>
This makes the background of the page grey, the heading black and the text in the
paragraph blue.
External CSS – this is an external stylesheet of its own used to define the style for
many HTML pages at a go. To use this, a link is added to it in the <head> section of
each html page.
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="styles.css">
</head>
<body>
</body>
</html>
body {
background-color: grey;
}
h1 {
Question One
a) Suggest the appropriate name and subsequent domain of the site and a
hosting plan.
name- majpharm
Domain - .com
majpharm.com
PRODUCTS PAGE
Question Two
a) Write an HTML5 script that will produce the above form.
b) Write a PHP code to create the table for Staff to store the information
from the above form.
c) Develop a PHP script to pick data from that form to the table created in c)
above.
<title>Hello, world!</title>
</head>
<body>
<div class="container mb-5 text-sm">
<div class="row">
<div class="col-6">
<h4>Personal Information</h4>
<form action="pi.php" method="POST">
<div class="form-group">
<label for="sname">Surname</label>
<input type="text" class="form-control" id="sname"
name="sname" placeholder="Surname">
</div>
<div class="form-group">
<label for="fname">Firstname</label>
<input type="text" class="form-control" id="fname"
name="fname" placeholder="Firstname">
</div>
<div class="form-group">
<label for="oname">Othername</label>
<input type="text" class="form-control" id="oname"
name="oname" placeholder="Othername">
</div>
<div class="form-group col-md-6">
<div class="form-check">
<input class="form-check-input" type="radio"
name="gender" id="male" value="M" checked>
<label class="form-check-label" for="male">
Male
</label>
</div>
<div class="form-check">
</div>
</div>
Db.sql
CREATE DATABASE `exam-form`;
USE `exam-form`;
Pi.php
<?php
$sname=$_POST["sname"];
$fname=$_POST["fname"];
$oname=$_POST["oname"];
$gender=$_POST["gender"];
$martialstatus=$_POST["martialstatus"];
$dob=$_POST["dob"];
$pob=$_POST["pob"];
$mname=$_POST["mname"];
$faname=$_POST["faname"];
$nod=$_POST["nod"];
$loe=$_POST["loe"];
//Database connection
$conn=new mysqli("localhost","root","","exam-form");
if ($conn->connect_error){
echo "Error";
die("Connection Failed:".$conn->connect_error);
}else{