'; echo ''; echo 'Browse - Meme Machine'; echo ''; echo ''; echo ''; echo '
'; echo '

Meme Machine

'; $dir = "../uploads"; $fileType = array( 'jpg', 'jpeg', 'png', 'gif' ); $servername = "localhost"; $username = "root"; $password = "Flamingh0m()"; $dbname = "memes"; $count = 0; $conn = mysqli_connect($servername, $username, $password, $dbname); if (!$conn) { die ("CONNECTION FAIL " .mysqli_connect_error()); } else { } if(isset($_POST["browse"])) { echo '

Category: ' . $_POST["memeCategory"] . '

'; $memeCategory = mysqli_real_escape_string($conn, $_POST["memeCategory"]); $browse = "SELECT * FROM memes WHERE category = \"$memeCategory\""; $result = mysqli_query($conn, $browse); if (mysqli_num_rows($result) > 0) { while($row = mysqli_fetch_assoc($result)) { $count++; echo '' . $row['; if ($count == 3) { echo '
'; } } } else { echo "This category is empty. Please choose another or start uploading"; ?>

 

Back Category: all'; $browse = "SELECT * FROM memes"; $result = mysqli_query($conn, $browse); //browse all code goes here if (mysqli_num_rows($result) > 0) { while($row = mysqli_fetch_assoc($result)) { $count++; echo '' . $row['; if ($count == 3) { echo '
'; } } } else { echo "Shit, something broke. Try again! Or if the problem persists contact the system administrator"; ?>

 

Back '; echo ''; ?>