I messed it up with the last commit, this fixes it
This commit is contained in:
@@ -24,11 +24,7 @@ $query = "Select * from contacts where fname = '".$_POST["fname"]."' and lname =
|
|||||||
|
|
||||||
|
|
||||||
foreach($db_connection->query($query) as $row){
|
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";
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -21,12 +21,7 @@ echo "<br>";
|
|||||||
$query = "Select * from contacts where username = '".$_POST["username"]."'";
|
$query = "Select * from contacts where username = '".$_POST["username"]."'";
|
||||||
|
|
||||||
foreach($db_connection->query($query) as $row){
|
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";
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user