0

Ip-Ban

Hello! Please tell me the following script: in the database my sql if the string = "Yes", then the user is blocked by the ip, if "No", then it is blocked Thank you.

11th Jul 2018, 3:32 PM
ŠŸŠ°ŃˆŠ° Š Š¾Š¶ŠŗŠ¾Š²
ŠŸŠ°ŃˆŠ° Š Š¾Š¶ŠŗŠ¾Š² - avatar
1 Answer
0
$sql = "SELECT * FROM user WHERE ip = '$ip"; $result = mysqli_query($conn, $sql); while ($row = mysqli_fetch_assoc($result)) { $string = $row["is_banned"]; } if ($string === "No") { /* User is not banned */ } else { /* User is banned */ }
22nd Jul 2018, 12:45 AM
N00B