@@ -5,7 +5,9 @@ |
||
| 5 | 5 | $stmt->execute(); |
| 6 | 6 | $result = $stmt->get_result(); |
| 7 | 7 | |
| 8 | - if($result->num_rows == 0) echo('welcome to gamestop how may i help you'); |
|
| 8 | + if($result->num_rows == 0) { |
|
| 9 | + echo('welcome to gamestop how may i help you'); |
|
| 10 | + } |
|
| 9 | 11 | } |
| 10 | 12 | ?> |
| 11 | 13 | |
@@ -99,7 +99,9 @@ |
||
| 99 | 99 | $stmt = $conn->prepare("SELECT * FROM users ORDER BY id DESC"); |
| 100 | 100 | $stmt->execute(); |
| 101 | 101 | $result = $stmt->get_result(); |
| 102 | - if($result->num_rows === 0) echo('There are no users.'); |
|
| 102 | + if($result->num_rows === 0) { |
|
| 103 | + echo('There are no users.'); |
|
| 104 | + } |
|
| 103 | 105 | while($row = $result->fetch_assoc()) { |
| 104 | 106 | $id = 1; |
| 105 | 107 | echo "<div class='item" . $id . "'><img style='height: 8em;width: 8em;' src='/dynamic/pfp/" . getPFP($row['username'], $conn) . "'><br><a href='/view/profile?id=" . $row['id'] . "'>" . $row['username'] . "</a></div>"; |
@@ -95,7 +95,9 @@ |
||
| 95 | 95 | $stmt->bind_param("s", $username); |
| 96 | 96 | $stmt->execute(); |
| 97 | 97 | $result = $stmt->get_result(); |
| 98 | - if($result->num_rows > 0) echo('<h1>Files</h1>'); |
|
| 98 | + if($result->num_rows > 0) { |
|
| 99 | + echo('<h1>Files</h1>'); |
|
| 100 | + } |
|
| 99 | 101 | |
| 100 | 102 | while($row = $result->fetch_assoc()) { |
| 101 | 103 | echo '<a href="/view?id=' . $row['id'] . '">' . $row['title'] . ' [' , $row['type'] . ']</a><br>'; |