Mini Shell

Direktori : /home/sicomercio/public_html/adm/
Upload File :
Current File : /home/sicomercio/public_html/adm/apagacatdeempresa.php

<?
  

 
//$id = $_POST["id"]; 
 
 
// print_r($_GET);
 
 $id = $_GET["id"]; 
 $empresa = $_GET["empresa"]; 




// excluir usuairo 


include"conexao.php";

// Create connection
$conn = new mysqli($host, $user, $pass, $db);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
} 

// sql to delete a record
$sql = "DELETE FROM tab_emp_categ WHERE id='$id' and id_empresa = '$empresa' ";
  //echo"$sql";
if ($conn->query($sql) === TRUE) {
 
 
   
  $or =  $_SERVER['HTTP_REFERER'];


   
  
  
  
} else {
    echo "Error deleting record: " . $conn->error;
}

$conn->close();


print'<script type="text/javascript">
         parent.location.reload(true); 
</script>';



   echo"<script type='text/javascript'> 
    window.alert('SUCESSO!')
window.location='$or';

   </script>";

// echo"$or";
?>



Zerion Mini Shell 1.0