I messed it up with the last commit, this fixes it

This commit is contained in:
Bryan
2019-12-04 19:35:54 -05:00
parent bc8f9ac22e
commit 6980fa65d2
2 changed files with 2 additions and 11 deletions

View File

@@ -24,11 +24,7 @@ $query = "Select * from contacts where fname = '".$_POST["fname"]."' and lname =
foreach($db_connection->query($query) as $row){
if(empty($row){
print("There is no user with that first and last name");
else{
print "First Name:".$row['fname']." Last Name:".$row['lname']." Username:".$row['username']."\n";
}
print "First Name:".$row['fname']." Last Name:".$row['lname']." Username:".$row['username']."\n";
}
?>

View File

@@ -21,12 +21,7 @@ echo "<br>";
$query = "Select * from contacts where username = '".$_POST["username"]."'";
foreach($db_connection->query($query) as $row){
if(empty($row){
print("There is no user with that name");
}
else{
print $row['username']." First Name:".$row['fname']." Last Name:".$row['lname']."\n";
}
print $row['username']." First Name:".$row['fname']." Last Name:".$row['lname']."\n";
}
?>