Advertisement
ineedphpsqlhelp

Block

Jun 7th, 2024
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. } elseif ($_GET['block']) {
  2. $result = @mysqli_query($mysqli_link, "SELECT block_id FROM blocked WHERE block_id='$account_id' AND player_id='$player_id' LIMIT 1")or die("Cannot double-check blocks! " . @mysqli_error($mysqli_link));
  3. $row = @mysqli_fetch_array($result);
  4. if ($row['block_id']) {
  5. myError("This player is already blocked!");
  6. } else {
  7. @mysqli_query($mysqli_link, "INSERT INTO blocked(block_id, player_id) VALUES('$account_id', '$player_id')")or die("Cannot block player! " . @mysqli_error($mysqli_link));
  8. myError("Player blocked!");
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement