Minor fixes and closing DB connections as needed

This commit is contained in:
WilliamMiceli
2019-12-04 21:48:04 -05:00
parent 5bb11b100b
commit d5f3df965f
9 changed files with 95 additions and 95 deletions

View File

@@ -4,21 +4,23 @@
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="styling.css">
</head>
<body>
<!--#include virtual="header.html" -->
<!--#include virtual="topNavBar.html" -->
<head>
<link rel="stylesheet" type="text/css" href="styling.css">
</head>
<body>
<!--#include virtual="header.html" -->
<!--#include virtual="topNavBar.html" -->
<?php
echo '<pre>';
$query = "Select * from contacts where fname = '".$_POST["fname"]."' and lname = '".$_POST["lname"]."'";
foreach($db_connection->query($query) as $row){
print "First Name:\t".$row['fname']."\nLast Name:\t".$row['lname']."\nUsername:\t".$row['username']."\n";
}
echo '</pre>';
?>
</body>
<?php
echo '<pre>';
$query = "Select * from contacts where fname = '".$_POST["fname"]."' and lname = '".$_POST["lname"]."'";
foreach($db_connection->query($query) as $row){
print "First Name:\t".$row['fname']."\nLast Name:\t".$row['lname']."\nUsername:\t".$row['username']."\n";
}
echo '</pre>';
?>
</body>
</html>
<?php
$db_connection = null;
?>