 <p>Can you try using,</p> <p><code>$delete = "DELETE from $table_name where $key = '".$value."' ";</code></p> <p>instead of </p> <p><code>$delete = "DELETE from $table_name where $key = $value";</code></p>