echo '<td><a href="https://www.reddit.com/user/' . $review_user->getUsername() . '/">/u/' . $review_user->getUsername() . '</a></td></tr>'; } ?> </table> <?php if (Auth::checkIfAuthenticated()) { ?> <form action="" method="POST"> <?php $review = UserReviews::getUserReview($game, $platform, $user); ?> <div class="form-group"> Submit User Review <select name="submit_game_rating" class="form-control"> <?php $ratings = Ratings::getAllRatings(); foreach ($ratings as $rating) { echo '<option value="' . $rating->getId() . '"'; if ($review != null && $review->getRating() == $rating->getId()) { echo ' selected="selected" '; } echo '>' . $rating->getTitle() . "</option>"; } ?> </select> </div> <div class="form-group"> <textarea class="form-control" name="submit_game_review"><?php if ($review != null) { echo $review->getReview(); }