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