hola, muchas gracias por tu respuesta. ps probe el codigo que pusiste en my script y no funciono, luego lo puse solo en otro archivo nuevo y si funciono
asi que debe ser algo que hago antes pero segun mi logica esta bien :s
aki dejo todo el codigo aver si alguien adivina que esta mal??? es un poco extenso por eso no lo avia puesto todo
Código PHP:
session_start();
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Pragma: no-cache");
include("x_mods.php");
$id = $_POST['txt_id'];
$txt_ap_pate = $_POST['txt_ap_paterno'];
$txt_ap_mate = $_POST['txt_ap_materno'];
$txt_nombres = $_POST['txt_nombres'];
$txt_instrum = $_POST['txt_instrumento'];
$txt_segundo = $_POST['txt_segundo_ins'];
$txt_calle_u = $_POST['txt_calle_usr'];
$txt_num_ext = $_POST['txt_num_ext'];
$txt_num_int = $_POST['txt_num_int'];
$txt_colonia = $_POST['txt_colonia'];
$txt_cod_pos = $_POST['txt_cod_post'];
$txt_tel_cas = $_POST['txt_tel_casa'];
$txt_tel_cel = $_POST['txt_tel_cel'];
$txt_tel_avi = $_POST['txt_tel_avisos'];
$txt_correoU = $_POST['txt_correo'];
$txt_con_cor = $_POST['txt_con_cor'];
$txt_lugar_n = $_POST['txt_lugar_nacim'];
$txt_fecha_n = $_POST['txt_ano_naci'] . $_POST['txt_mes_naci'] . $_POST['txt_dia_naci'];
$txt_naciona = $_POST['txt_naciona'];
$txt_edadUsr = $_POST['txt_edad'];
$rbn_sexoUsr = $_POST['rbn_sexo'];
$cmb_escolar = $_POST['cmb_escolaridad'];
$rbn_es_depe = $_POST['rbn_es_dependiente'];
if( $rbn_es_depe=="s" )
{
//echo "si set-".$_POST['ckb_estudiante']."-";exit(0);
}
else
{
$_POST['ckb_trabajador'] = "es_trabajador";
}
//------------------------------------------------------------------------
$ckb_estudia = $_POST['ckb_estudiante'];
if($ckb_estudia == "es_estudiante")
{
$txt_escuela = $_POST['txt_escuel'];
$txt_nivel_e = $_POST['txt_nivel'];
$txt_especia = $_POST['txt_especi'];
$txt_pormedi = $_POST['txt_pormedio'];
}
else
{
$txt_escuela = "";
$txt_nivel_e = "";
$txt_especia = "";
$txt_pormedi = 0;
}
//------------------------------------------------------------------------
$ckb_trabaja = $_POST['ckb_trabajador'];
if($rbn_es_depe!="s")
{
$txt_centroT = $_POST['txt_centro'];
$rbn_es_jubi = $_POST['rbn_es_jubilado'];
$txt_tel_tra = $_POST['txt_tel_tra'] . $_POST['txt_tel_o_ex'];
}
else
{
$txt_centroT = "";
$rbn_es_jubi = "";
$txt_tel_tra = "";
}
$rbn_viveCon = $_POST['rbn_vive'];
$txt_vive_ot = $_POST['txt_vive_otro'];
//---
$_SESSION["txt_ap_pate"] = $txt_ap_pate;
$_SESSION["txt_ap_mate"] = $txt_ap_mate;
$_SESSION["txt_nombres"] = $txt_nombres;
$_SESSION["txt_instrum"] = $txt_instrum;
$_SESSION["txt_segundo"] = $txt_segundo;
$_SESSION["txt_calle_u"] = $txt_calle_u;
$_SESSION["txt_num_ext"] = $txt_num_ext;
$_SESSION["txt_num_int"] = $txt_num_int;
$_SESSION["txt_colonia"] = $txt_colonia;
$_SESSION["txt_cod_pos"] = $txt_cod_pos;
$_SESSION["txt_tel_cas"] = $txt_tel_cas;
$_SESSION["txt_tel_cel"] = $txt_tel_cel;
$_SESSION["txt_tel_avi"] = $txt_tel_avi;
$_SESSION["txt_correoU"] = $txt_correoU;
$_SESSION["txt_correo2"] = $txt_con_cor;
$_SESSION["txt_lugar_n"] = $txt_lugar_n;
$_SESSION["txt_fecha_n"] = $txt_fecha_n;
$_SESSION["txt_naciona"] = $txt_naciona;
$_SESSION["txt_edadUsr"] = $txt_edadUsr;
$_SESSION["rbn_sexoUsr"] = $rbn_sexoUsr;
$_SESSION["cmb_escolar"] = $cmb_escolar;
$_SESSION["rbn_es_depe"] = $rbn_es_depe;
$_SESSION["txt_escuela"] = $txt_escuela;
$_SESSION["txt_nivel_e"] = $txt_nivel_e;
$_SESSION["txt_especia"] = $txt_especia;
$_SESSION["txt_pormedi"] = $txt_pormedi;
$_SESSION["txt_centroT"] = $txt_centroT;
$_SESSION["rbn_es_jubi"] = $rbn_es_jubi;
$_SESSION["txt_tel_tra"] = $txt_tel_tra;
$_SESSION["rbn_viveCon"] = $rbn_viveCon;
$_SESSION["txt_vive_ot"] = $txt_vive_ot;
$_SESSION["ckb_estudia"] = $ckb_estudia;
$_SESSION["ckb_trabaja"] = $ckb_trabaja;
//---
if($txt_nombres=="" && $txt_ap_pate=="" && $txt_ap_mate=="")
{
echo "error 1";
exit(0);
}
$estaba = nombre_compreto($txt_nombres, $txt_ap_pate, $txt_ap_mate);
if($estaba == true)
{
echo "error 2";
exit(0);
}
$res = ereg(
'^[a-zA-Z0-9]+([\.]?[a-zA-Z0-9_-]+)*@'.// usuario
'[a-zA-Z0-9]+([\.-]+[a-zA-Z0-9]+)*\.[a-z]{2,}$', // server.
$txt_correoU);
if($res == false)
{
echo "error 3";
exit(0);
}
/*
$rbn_es_depe = $_POST['rbn_es_dependiente']; // $_POST['rbn_es_dependiente'] tiene el valor n
$_SESSION["rbn_es_depe"] = $rbn_es_depe; // por lo tanto $rbn_es_depe y $_SESSION["rbn_es_depe"] tambien
echo $rbn_es_depe . "-" . $_SESSION["rbn_es_depe"] . "<br>"; //despliega: n-n
$rbn_es_depe = "a";
echo $rbn_es_depe . "-" . $_SESSION["rbn_es_depe"];exit(0); //despliega a-a
//no deberia desplegar a-n ??????
*/
$rbn_es_depe = "n"; // $_POST['rbn_es_dependiente'] tiene el valor n
$_SESSION["rbn_es_depe"] = $rbn_es_depe; // por lo tanto $rbn_es_depe y $_SESSION["rbn_es_depe"] tambien
echo $rbn_es_depe . "-" . $_SESSION["rbn_es_depe"] . "<br>"; //despliega: n-n
$rbn_es_depe = "a";
echo $rbn_es_depe . "-" . $_SESSION["rbn_es_depe"];exit(0);
gracias por sus respuestas