prepare("Select nombre as t_nom_cat from personalidad where id_personalidad = ?"); $obtenemos_nombre_categoria->bind_param("i",$_GET['p']); $obtenemos_nombre_categoria->execute(); $obtenemos_nombre_categoria->bind_result($t_nom_cat); $obtenemos_nombre_categoria->store_result(); $obtenemos_nombre_categoria->fetch(); } elseif (isset($_GET['d']) && $_GET['d'] ==0) { $obtenemos_nombre_categoria = $mysqli->prepare("Select nombre_categoria as t_nom_cat from categoria where id_categoria = ? and estado = 1"); $obtenemos_nombre_categoria->bind_param("i",$_GET['id']); $obtenemos_nombre_categoria->execute(); $obtenemos_nombre_categoria->bind_result($t_nom_cat); $obtenemos_nombre_categoria->store_result(); $obtenemos_nombre_categoria->fetch(); } elseif(isset($_GET['n'])) { if ($_GET['n'] == 1) { $obtenemos_nombre_categoria = $mysqli->prepare("Select nombre_categoria as t_nom_cat from categoria where id_categoria = ? and estado = 1"); $obtenemos_nombre_categoria->bind_param("i",$_GET['id']); $obtenemos_nombre_categoria->execute(); $obtenemos_nombre_categoria->bind_result($t_nom_cat); $obtenemos_nombre_categoria->store_result(); $obtenemos_nombre_categoria->fetch(); } elseif ($_GET['n'] == 2) { $obtenemos_nombre_categoria = $mysqli->prepare("Select nombre_categoria_2 as t_nom_cat from categoria_2 where id_categoria_2 = ? and estado = 1"); $obtenemos_nombre_categoria->bind_param("i",$_GET['id']); $obtenemos_nombre_categoria->execute(); $obtenemos_nombre_categoria->bind_result($t_nom_cat); $obtenemos_nombre_categoria->store_result(); $obtenemos_nombre_categoria->fetch(); } elseif ($_GET['n'] == 3) { $obtenemos_nombre_categoria = $mysqli->prepare("Select nombre_categoria_3 as t_nom_cat from categoria_3 where id_categoria_3 = ? and estado = 1"); $obtenemos_nombre_categoria->bind_param("i",$_GET['id']); $obtenemos_nombre_categoria->execute(); $obtenemos_nombre_categoria->bind_result($t_nom_cat); $obtenemos_nombre_categoria->store_result(); $obtenemos_nombre_categoria->fetch(); } } ?>
close