DB Inter To Website
DB Inter To Website
Database
Database – a database is a collection of data (tables, queries, reports, views and other objects)
that are typically organized to provide information or support processes requiring information
like going through hotel vacancies online (applications will run through the vacancy report from
the database and will return results to the user).
It is basically a structured data storage that can be accessed through a set of computer software
that allows users to make these data interact, provided by a DBMS or Database Management
System. This DBMS will also provide other various functions that allow data entry, storage, and
provide data management.
As a physical database, these are dedicated servers containing the actual data provided and
organized by the DBMS. These are usually multiprocessor systems with lots of memory and of
course generous RAID (data storage virtualization combining multiple physical disk drives into a
single logical unit for a better performance) disk arrays used for stable storage.
Website
A Website – known simply as a site, is a set of web pages that generally serves a single web
domain. It is hosted by a web server and will be accessible via the internet or private LAN (local
area network) by means of an internet address known as an URL (uniform resource locator).
These web pages, which are the building blocks of a website, are usually written in plain text that
will go through the formatting instructions of Hypertext Markup Language (HTML, XHTML). A
web browser will then render the page content according to its HTML markup instructions onto a
display terminal or monitor, which now will be what the ‘SITE” will look like. Web pages are
accessed and are transported with the HTTP or Hypertext Transfer Protocol, or to a secure one,
the HTTP secure (HTTPS) for better security and privacy for users. This is why most financial-
involved websites use the HTTPS instead of the HTTP.
Comparison
Database Website
Information from a database will be required by a Will require information from a database
set of instructions from a website depending on the instructions
One way to utilize a large quantity of data is to integrate your website with a database. This can
make your website more interactive and informative to prospective customers, both publishing
and collecting data. Common examples of data integrated websites are:
Systems can be based on Microsoft Access databases (limited number of users at one time) to
SQL databases (providing a faster, more flexible back-end) to simple data tables. Legacy
systems that you are using in your company today may also be integrated into web-based
systems.
Think about all the things your website could do with a database integrated back-end:
List your products (i.e., real estate listings, e-commerce products, etc.) for prospective
customers to view
Customers can make appointments online for consultations
Private Areas of your website can have databases integrated into them as well:
Data integrated systems can make managing data on the web a breeze. To find your customized
solution for the web, contact us today!
EXERCISES’ CODES
DATABASE CREATED
LOGIN FORM
<html>
<head>
</head>
<body bgcolor="#FFFF00">
</form>
<center>
<?php
if(isset($_REQUEST['log']))
$x=mysql_connect("localhost","root","");
mysql_select_db("level",$x);
$a=$_POST['u'];
$b=$_POST['p'];
while($r=mysql_fetch_array($q))
$z=$r['username'];
$y=$r['password'];
else
?>
</center>
</body>
</html>
STUDENT REGISTRATION
<html>
<head>
</head>
<body>
<tr><td>Gender:</td><td><select name="g"><option>Select
Gender</option><option>Male</option><option>Female</option></select></td></tr>
<tr><td>Class:</td><td><select name="c"><option>Select
Class</option><option>S1</option><option>S2</option><option>S3</option><option>S4</
option><option>S5</option><option>S6</option></select></td></tr>
</form>
<?php
if(isset($_REQUEST['sv']))
$x=mysql_connect("localhost","root","");
mysql_select_db("level",$x);
$a=$_POST['n'];
$b=$_POST['g'];
$c=$_POST['c'];
if($sql)
echo"Well saved";
else
echo"Not saved";
?>
</body>
</html>
STUDENT TABLE
<html>
<head>
</head>
<body>
</table>
</td></tr></table>
</form>
<?php
if(isset($_REQUEST['sv']))
$con=mysql_connect("localhost","root","");
mysql_select_db("school",$con);
$a=$_POST['sn'];
$b=$_POST['sm'];
$c=$_POST['gd'];
$d=$_POST['cb'];
$e=$_POST['cs'];
$f=$_POST['sg'];
$sql=mysql_query("insert into
student(snumber,snames,sgender,combination,class,email)values('$a','$b','$c','$d','$e','$f')");
if($sql)
echo"Well saved";
else
echo"Try again!";
?>
</body>
</html>
<tr><td>Class:</td><td><select name="c"><option>Select
Class</option><option>S1</option><option>S2</option><option>S3</option><option>S4</
option><option>S5</option><option>S6</option></select></td></tr>
</table>
</form>
<?php
if(isset($_REQUEST['up']))
$x=mysql_connect("localhost","root","");
mysql_select_db("level",$x);
$a=$_POST['n'];
$b=$_POST['g'];
$c=$_POST['c'];
if($sql)
echo"Well Updated";
else
{
echo"Not Updated";
?>
<?php
if(isset($_REQUEST['dl']))
$con=mysql_connect("localhost","root","");
mysql_select_db("school",$con);
if($sql)
echo"Well deleted";
else
echo"Try again!";
}
}
?>
</form>
<?php
if(isset($_REQUEST['ddl']))
$con=mysql_connect("localhost","root","");
mysql_select_db("school",$con);
$xx=$_POST['d'];
if($sql)
echo"Well deleted";
else
echo"Try again!";
}
?>
</form>
<table
border="1"><th>NUMBER</th><th>NAMES</th><th>GENDER</th><th>COMBINATION<
/th><th>CLASS</th><th>EMAIL</th>
<?php
if(isset($_REQUEST['sh']))
$con=mysql_connect("localhost","root","");
mysql_select_db("school",$con);
while($row=mysql_fetch_array($sql))
echo"<tr><td>".$row['snumber']."</td>";
echo"<td>".$row['snames']."</td>";
echo"<td>".$row['gender']."</td>";
echo"<td>".$row['combination']."</td>";
echo"<td>".$row['class']."</td>";
echo"<td>".$row['email']."</td></tr>";
}
}
?>
</table>
</form>
<table
border="1"><th>NUMBER</th><th>NAMES</th><th>GENDER</th><th>COMBINATION<
/th><th>CLASS</th><th>EMAIL</th>
<?php
if(isset($_REQUEST['search']))
$con=mysql_connect("localhost","root","");
mysql_select_db("school",$con);
$sss=$_POST['scc'];
while($row=mysql_fetch_array($sql))
echo"<tr><td>".$row['snumber']."</td>";
echo"<td>".$row['snames']."</td>";
echo"<td>".$row['sgender']."</td>";
echo"<td>".$row['combination']."</td>";
echo"<td>".$row['class']."</td>";
echo"<td>".$row['email']."</td></tr>";
?>
</table>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Software Development</title>
<script type="text/javascript">
function print_page() {
ButtonControl.style.visibility = "hidden";
window.print();
</script>
</head>
<body>
<?php
$x=mysql_connect("localhost","root","");
mysql_select_db("level",$x);
$a=$_POST['n'];
echo"<br><br>";
while($r=mysql_fetch_array($sql))
echo"<tr>";
echo"<td>".$r['snumber']."</td>";
echo"<td>".$r['names']."</td>";
echo"<td>".$r['gender']."</td>";
echo"<td>".$r['class']."</td>";
echo"<td>".$r['dates']."</td>";
echo"<td>".$r['amount']."</td>";
echo"</tr></table>";
?>
</body>
</html>