prepare('SELECT * FROM pastes WHERE uid=:uid'); $stmt->bindParam(':uid', $paste); $stmt->execute(); if($stmt->rowCount()>0){ while($row = $stmt->fetch(PDO::FETCH_ASSOC)) { if($row['owner'] === $uid){ $stmt2 = $conn->prepare("DELETE FROM pastes WHERE id=:id"); $stmt2->bindParam(':id', $row['id']); $stmt2->execute(); $conn = null; echo '

Paste '.$row["uid"].' has been deleted!

'; echo ''; die(); } else { $conn = null; echo '

You are not the owner of the paste '.$row["uid"].'

'; echo ''; die(); } } } else { $conn = null; echo '

The paste '.$row["uid"].' does not exist

'; echo ''; die(); } $conn = null; } ?>