Minor fixes and closing DB connections as needed
This commit is contained in:
@@ -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;
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user