Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

Programme Name: BCS IT (Hons.

Course Code: CSC 2514

Course Name: Web System and Technologies

Submitted By: Submitted To:

Student Name: Rakshya Nepali Faculty Name: Prakash Chandra

IUKL ID: 041902900050 Department: LMS

Semester: Fourth

Intake: Sep, 2019

1. The design considerations for website development are:


a. Highly intuitive structure
Highly intuitive structure and should be simple to understand so that
users would not have to think which way to go. It must be self-
explanatory in an obvious kind of way. This helps to increase the
usability of the website and also makes it much more engaging. The
structure must be free from lots of cognitive load so that visitors don’t
have to wonder how to move from point A to point B.

b. Visual hierarchy
Visual hierarchy is the order or sequence in which our eye moves and
perceives the things it sees. When it comes to a web page, the visual
hierarchy can be referred to the sequence in which our eye moves from
one topic/content/block to another. When designing a web page, a
designer first needs to identify the order of importance of the various
topics and then place them in such a way that the visitors first view
what is most important and then move onto the others in a hierarchical
manner.

c. Accessibility
When a visitor enters the website, he/she must be able to access each
bit of information in the easiest manner. This means that the text must
be legible, the colors must not be harsh on the eyes and the background
must not overpower the content, etc.

d. Hick’s law
Hick’s law states that ‘with every additional choice increases the time
required to take a decision.‘This law does not only hold true for web
design but also in a number of other situations and settings. As far as
web designing is concerned, the more options you offer to your
visitors, the more difficult the website will become to use and browse
through. This means that we need to reduce the number of choices in
order to provide a better user experience. Distracting options have to
be eliminated to aid increased sales and better overall profit. Hick’s
law can also be translated to ‘More options mean less sales’.

e. Fitt’s Law
Fitt’s law states that ‘the time needed to move to a target is dependent
upon the size of the target as well as the distance to the target.
‘However, this does not mean that the bigger, the better but means that
the usability factor of a target runs as a curve and not as a straight line.
When you apply this law to your web design, then users may be more
motivated and encouraged to press the button that you want them to
press.
2.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<?php
if($_SERVER['REQUEST_METHOD']=='POST')
{
$num = $_POST['num'];
echo "<h3> Result obtained: </h3>";

if($num>=70){
echo"DISTINCTION";
}
elseif($num>=60 && $num<=69){
echo "First Division";
}
elseif($num>=50 && $num <=59){
echo "second divaision";
}
else{
echo"fail";
}
}
?>
<form action="<?php htmlspecialchars($_SERVER['PHP_SELF']);?>"
method="POST">
<p>Enter percentage of marks obtain:</p>
<input type="number" name="num">
<input type="submit">
</form>
</body>
</html>

OUTPUT
3.

<!DOCTYPE html>

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Form
</title>
<style>
th,
td {
text-align: left;
font-size: 23px;
font-family: 'Times New Roman', Times, serif;
padding-bottom: 10px;
}

td input,
td select {
font-size: 20px;
}
</style>

<body>
<?php
$_target_dir = 'uploads/';
if ($_SERVER['REQUEST_METHOD'] == 'POST' and
isset($_POST['submit'])) {
$name = $_POST['name'];
$price = $_POST['price'];

$target_file = $_target_dir . basename($_FILES['fileToUpload']['name']);


move_uploaded_file($_FILES['fileToUpload']['tmp_name'], $target_file);
$server = "localhost";
$username = "root";
$password = "";
$db = "exam";
$conn = new mysqli($server, $username, $password, $db);
if ($conn->connect_error) {
die("connection cannot be established");
} else {
$sql = "INSERT INTO PRODUCT(name,price,path)values('$name',
$price,'$target_file')";
if ($conn->query($sql) == True)
echo "New record inserted";
else {
echo "Error" . $sql . "<br>" . $conn->error;
}
}
}

?>

<form action="<?php htmlspecialchars($_SERVER['PHP_SELF']) ?>"


enctype="multipart/form-data" method="POST">
<table>
<tr>
<th>
<label>Product Name : </label>
</th>
<td>
<input type="text" name="name" size="25">
</td>
</tr>
<tr>
<th>
<label>
Product Price :
</label>
<td>
<input type="number" name="price" step='1' min='0' max='10000'>
</td>
</th>
</tr>

<tr>
<th>
<label>
Photo :
</label>
<td>
<input type="file" name='fileToUpload' value="fileToUpload">
</td>
</th>
</tr>
<tr>
<th>
</th>
<td>
<input type="submit" name="submit" >
</td>
</tr>
<?php

?>
</body>

</head>

<!DOCTYPE html>

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Form
</title>
<style>
table, th,
td {
text-align: left;
font-size: 23px;
font-family: 'Times New Roman', Times, serif;
padding-bottom: 10px;
border: 1px solid black;
border-collapse: collapse;
}

td input,
td select {
font-size: 20px;
}
</style>

<body>
<?php

$server = "localhost";
$username = "root";
$password = "";
$db = "exam";
$conn = new mysqli($server, $username, $password, $db);
if ($conn->connect_error) {
die("connection aborted");
} else
{
// echo "connection established<br>";

$sql1 = " SELECT * FROM PRODUCT";


$result = $conn->query($sql1);
if ($result->num_rows > 0) {
echo "
<h3>Detailed information of product id: </h3>
<table>

<tr>
<th>
photo
</th>

<th>Name
</th>
<th>
Price
</th>

</tr>
";

while ($rows = $result->fetch_assoc()) {

echo "<tr>";

echo "<td>" . $rows['name'] . "</td>";

echo "<td>" . $rows['price'] . "</td>";

echo "<td><img src='" . $rows['path'] . "' height=150px


width=150px</td>";
echo "</tr>";
}
echo " </table> <br>";
}

?>

OUTPUT

You might also like