Skip to content

Instantly share code, notes, and snippets.

@asterion
Last active June 27, 2017 18:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asterion/205b88cb72d0898246508af172560ee8 to your computer and use it in GitHub Desktop.
Save asterion/205b88cb72d0898246508af172560ee8 to your computer and use it in GitHub Desktop.
Nadie puede poner un die en un if
<?php
$cod_item = limpiar($_POST['cod_item']);
$sql = "SELECT * FROM content WHERE code = '$cod_item'";
$result = $con->query($sql) or die ($con->error);
if ($result->num_rows > 0) {
}
$sql = "DELETE * FROM content WHERE code = '$cod_item'";
if (!$con->query($sql)) {
echo $con->error;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment