fixing the usernameSearch hopefully
This commit is contained in:
@@ -12,24 +12,10 @@ body {
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
$servername = "localhost";
|
||||
$username = "web";
|
||||
$password = "Password456";
|
||||
|
||||
// Create connection
|
||||
$conn = new mysqli($servername, $username, $password);
|
||||
|
||||
// Check connection
|
||||
if ($conn->connect_error) {
|
||||
die("Connection failed: " . $conn->connect_error);
|
||||
}
|
||||
|
||||
echo "<br>";
|
||||
$query = "Select * from contacts where username = '".$_SESSION["loggedInUser"]."'";
|
||||
$result4 = $conn->query($query);
|
||||
|
||||
foreach($db_connection->query($sql_statement) as $row){
|
||||
foreach($db_connection->query($query) as $row){
|
||||
print $row['username']." First Name:".$row['fname']." Last Name:".$row['lnam']."\n";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user