3-tier Application (Using web you need to use PHP and MySQL database) This assig
ID: 3559814 • Letter: 3
Question
3-tier Application (Using web you need to use PHP and MySQL database)
This assignment has two parts: the work outlined in this documentation and the project demonstration to the class. you need to design your database system first, then translation your design to a Web application using server side scripting language PHP. It is required that you use the open source database management system MySQL and the PHP language to do this 3-tier architecture.
You must supply the following website information:
Web address:
Website Administrative login:
Password:
The important guidelines for this assignment are the following:
Problem Description: you need to choose an application domain by yourself. Some example domains are: online stores, online banking, online video stores, inventory management applications, etc.
Once the application domain is chosen, you need to do the design (include ER diagrams). Once the design is done, you translate the design into a real application.
REQUIREMENT FOR WEB PAGES
You need to develop a web site with modest complexity. Your website must have at least 7 vastly different pages. Two pages are considered vastly different if they have different structures and different contents; for example one is a form with gadgets and another is a main page with text. If two pages have the same structure and differ only in the content of the text, then they are not considered to be vastly different. Also, two form pages are vastly different if one is for data insertion, the other is for data updating or deleting.
Among this minimum number of pages, you must have at least three form pages: one for data insertion, one for data updating, and one for data deleting. You also need to have at least one page to display data coming from at least two database tables.
The Main Web Page
This is the first page of your website. Usually, the page is named index.html (or index.php). If you do that, a user can find your website by typing just the web server
Explanation / Answer
!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Wines</title>
</head>
<body><pre>
<?php
// (1) Open the database connection and use the winestore
// database
$connection = mysql_connect("localhost","fred","shhh");
mysql_select_db("winestore", $connection);
// (2) Run the query on the winestore through the
// connection
$result = mysql_query ("SELECT * FROM
wine", $connection);
// (3) While there are still rows in the result set,
// fetch the current row into the array $row
while ($row = mysql_fetch_row($result))
{
// (4) Print out each element in $row, that is,
// print the values of the attributes
for ($i=0; $i<mysql_num_fields($result); $i++)
echo $row[$i] . " ";
// Print a carriage return to neaten the output
echo " ";
}
// (5) Close the database connection
mysql_close($connection);
?>
</pre>
</body>
</html>
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.