Mini Shell

Direktori : /home/sicomercio/domains/sicomerciomppa.com.br/public_html/adm/
Upload File :
Current File : /home/sicomercio/domains/sicomerciomppa.com.br/public_html/adm/editalegendadados.php

<?
include"menu.php";



switch ($permissao)
{
case "2":
 
// excluir empresa do usuairo

 // print_r($_POST);
$legenda = $_POST["legenda"]; 
 $id = $_POST["id"]; 
 
 
 $id= base64_decode($id);
 $legenda =  utf8_decode("$legenda");
 
 include"conexao.php";
// Create connection
$conn = new mysqli($host, $user, $pass, $db);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
} 

 $idd = base64_decode($idd); 
$sql = "UPDATE anexos SET legenda = '$legenda' WHERE id='$id' ";
 
  //echo"$sql";
if ($conn->query($sql) === TRUE) {


} else {
      echo "Error updating record: " . $conn->error;
	  print'<script type="text/javascript" language="">  alert("OCORREU UM ERRO!"); </script>';
}

$conn->close();

 
 
 
 
   echo"<script type='text/javascript'> 
    window.alert('ATUALIZADO COM SUCESSO!')
	setTimeout(function() {window.history.back()}, 1000);

   </script>";
   
 
break;

default:
echo "<script>
alert('sem permissão! ');
 
</script>";
exit();
break;
}



?>



Zerion Mini Shell 1.0