note 118421 deleted from mysqli.real-escape-string by cmb

From: Date: Wed, 24 Jul 2019 13:34:49 +0000
Subject: note 118421 deleted from mysqli.real-escape-string by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-211695@lists.php.net to get a copy of this message
Note Submitter: anon ---- if ($_SERVER['REQUEST_METHOD'] == "GET" && isset($_GET['value'])) { $id = trim($link->real_escape_string($_GET['value'])); $sql = "DELETE FROM database WHERE IDItem = $id"; if (!$res = $link->query($sql)) { $_SESSION['alertify'] = 'alertify.error("' . $link->error . '")'; } else { $_SESSION['alertify'] = 'alertify.success("' . $value . ' was succesfully deleted")'; } }

« previous php.notes (#211695) next »