Si lo hago asi, da error en el segundo bind_param
Código PHP:
require_once('conexion.php');
$conexion = conectar();
$id = $_GET["id"];
$sql = "SELECT EMAIL FROM USUARIO WHERE ID = ?";
$statement = $conexion -> prepare($sql);
$statement -> bind_param("i", $id);
$statement -> execute();
$statement -> bind_result($email);
$statement -> fetch();
$statement -> close();
if(isset ($email)){
$sql = "UPDATE USUARIO SET ESTADO = 1 WHERE ID = ?";
$statement = $conexion -> prepare($sql);
$statement -> bind_param("i",$id); <--- AQUI
if($statement -> execute()){
echo "Bien";
}
$statement -> close();
}
$conexion -> close();