Files
WMU-CS4430-Project/var/www/nameSearch.php
2019-12-04 17:16:57 -05:00

30 lines
637 B
PHP

<?php
require 'common.php';
require 'loginRequired.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<body>
<!--#include virtual="header.html" -->
<!--#include virtual="topNavBar.html" -->
<style>
body {
background-color: #3B5998;
}
</style>
<?php
$query = "Select * from contacts where fname = '".$_POST["fname"]."' and lname = '".$_POST["lname"]."'";
foreach($db_connection->query($query) as $row){
print "First Name:".$row['fname']." Last Name:".$row['lname']." Username:".$row['username']."\n";
}
?>
</body>
</html>