text-align: right; filter: alpha(opacity=0); opacity: 0; outline: none; background: white; cursor: inherit; display: block; } </style> <?php $error = ''; if ($siteUser->isLoggedIn() == false) { $error = "You need to be logged in to add adventures."; } else { if ($siteUser->getType() == "Reader") { $error = "'Reader' account types cannot add adventures. Contact administrator to upgrade your account."; } else { if ($siteUser->getType() == "Admin") { // admin can add adventures and can edit any adventure } else { if (isset($_GET['mode']) && $_GET['mode'] == "edit") { $user_id = $siteUser->getUserId(); $stmt = $mysql->prepare("SELECT * FROM adventure WHERE user_id=? AND adventure_id=?"); $stmt->bind_param("ii", $user_id, $_POST['adventure_id']); $stmt->execute(); $r = $stmt->get_result(); if ($r->num_rows != 1) { $error = "You cannot edit this adventure."; } }