<?php include 'database.php'; $database = new Database(); // // echo "string"; // //todo: Make it so there is only one of a brick and if a user posts a brick with the same one it will give a link to the brick // // class addBrick{ if (isset($_POST['upvote'])) { $brickId = $_POST['id']; # code... $database->upvote($brickId); header("Location: proposeSolution.php?id=" . $brickId); } elseif (isset($_POST['downvote'])) { # code... $brickId = $_POST['id']; $database->downvote($brickId); header("Location: proposeSolution.php?id=" . $brickId); } else { echo "<h3>You are in a restricted area your access has been recorded and reported. Please Leave</h3>"; }