hello I hope you can help me I want to delete specific session variables, but it does not, I'm using the unset function, but my code does not delete the session variables I have two buttons by which depending on which one they choose me to a file php in which are my two options to delete my session variables, sent a variable called option through the url of the page and the value that will be evaluated in my php file that receives these variables but does not and apsera that if it shows me the message that it was executed correctly are not deleted follow the data in the session, this is the code of my php file called cancelCotization.php:
<?php
$opc=htmlentities($_GET['opcion']);
if ($opc='eliminarAll') {
// code...
unset($_SESSION['cnombre'],
$_SESSION['cPriapellido'],
$_SESSION['cSegapellido'],
$_SESSION['cdireccion'],
$_SESSION['cemali'],
$_SESSION['Ocupacion'],
$_SESSION['crfc'],
$_SESSION['telCliTipo'],
$_SESSION['clitel'],
$_SESSION["shopping_cart"]);
}else if($opc='eliminarEncargado'){
unset($_SESSION['cnombre'],
$_SESSION['cPriapellido'],
$_SESSION['cSegapellido'],
$_SESSION['cdireccion'],
$_SESSION['cemali'],
$_SESSION['Ocupacion'],
$_SESSION['crfc'],
$_SESSION['telCliTipo'],
$_SESSION['clitel']);
}
header('location:../inicio/index.php');
?>
and these are my two buttons which redirect to the same page the two but with different value in the variable option this s the code
<a title="Cancelar esta cotizacion" href="../cotizaciones/cancelarCotizacion.php?opcion=eliminarAll" class="btn-floating btn-large waves-effect waves-light red" ><i class="material-icons">delete_sweep</i></a>
<a title="eliminar datos de encargado" href="../cotizaciones/cancelarCotizacion.php?opcion=eliminarEncargado" class="btn-floating btn-large waves-effect waves-light green" ><i class="material-icons">voice_over_off</i></a>