Files
WMU-CS4430-Project/var/www/usernameSearch.php

31 lines
681 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>
<head>
<link rel="stylesheet" type="text/css" href="styling.css">
</head>
<body>
<!--#include virtual="header.html" -->
<!--#include virtual="topNavBar.html" -->
<style>
body {
background-color: #3B5998;
}
</style>
<?php
echo "<br>";
$query = "Select * from contacts where username = '".$_POST["username"]."'";
foreach($db_connection->query($query) as $row){
print $row['username']." First Name:".$row['fname']." Last Name:".$row['lname']."\n";
}
?>
</body>
</html>