updating the username search
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
<?php
|
||||
require 'common.php';
|
||||
require 'loginRequired.php';
|
||||
?>
|
||||
<html>
|
||||
<body>
|
||||
<style>
|
||||
@@ -8,7 +12,6 @@ body {
|
||||
|
||||
<?php
|
||||
|
||||
$username = $_POST["username"];
|
||||
|
||||
$servername = "localhost";
|
||||
$username = "web";
|
||||
@@ -23,17 +26,13 @@ if ($conn->connect_error) {
|
||||
}
|
||||
|
||||
echo "<br>";
|
||||
$query = "Select * from contacts where username = {$username}";
|
||||
mysqli_query($conn, $query) or die('Error querying database.');
|
||||
$query = "Select * from contacts where username = '".$_SESSION["loggedInUser"]."'";
|
||||
$result4 = $conn->query($query);
|
||||
|
||||
$result = mysqli_query($conn, $query0);
|
||||
$row = mysqli_fetch_array($result);
|
||||
|
||||
while ($row = mysqli_fetch_array($result)) {
|
||||
echo $row['username'] . ': ' . $row['fname'] . ' ' . $row['lnam'] .'<br />';
|
||||
foreach($db_connection->query($sql_statement) as $row){
|
||||
print $row['username']." First Name:".$row['fname']." Last Name:".$row['lnam']."\n";
|
||||
}
|
||||
|
||||
print $query;
|
||||
|
||||
mysqli_close($conn);
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user