Y ahora el código que utilizo en Validación:
<?
session_start();
$id_usuario = $_SESSION['id_usuario'];
require '..\include\conecta.php';
$Seleccion = $_POST['Seleccion_Ingresar'];
//validación del formulario 9
if($Seleccion==" ") {
//var_dump($_POST);
$riff = $_POST['rif']; //extraemos la variable
if ($riff == "" ){
$msgrif = "Falta Ingresar la Rif";
$_POST['msgrif'] = $msgrif;
header("location:actualizar_datoss_.php");
} else {
if (!is_numeric($riff)) {
$msgrif = "Rif debe ser numerica";
$_POST['msgrif'] = $msgrif;
//$claserif = "error";
header("location:actualizar_datoss_.php");
}
}
/*if ($clasetitulo == "" && $claserif == "" ) {
//agregar el elemento o la accion deseada
echo "OK"; // Ej. Guardado correctamente
} */
}elseif($Seleccion=="1") {
$riff = $_POST['rif']; //extraemos la variable
if ($riff == "" ){
$msgrif = "Falta Ingresar la Rif";
//$HTTP_POST_VARS['msgrif'] = $msgrif;
$_POST['msgrif'] = $msgrif;
//$claserif = "error";
header("location:actualizar_datoss_.php");
} else {
if (!is_numeric($riff)) {
$msgrif = "Rif debe ser numerica";
$_POST['msgrif'] = $msgrif;
//$claserif = "error";
header("location:actualizar_datoss_.php");
}
}
}elseif($Seleccion=="2") {
$riff = $_POST['rif']; //extraemos la variable
$tsu = $_POST['titulotsu']; //extraemos la variable
if ($riff == "" ){
$msgrif = "Falta Ingresar la Rif";
//$HTTP_POST_VARS['msgrif'] = $msgrif;
$_POST['msgrif'] = $msgrif;
//$claserif = "error";
header("location:actualizar_datoss_.php");
}else {
if (!is_numeric($riff)) {
$msgrif = "Rif debe ser numerica";
$_POST['msgrif'] = $msgrif;
//$claserif = "error";
header("location:actualizar_datoss_.php");
}
}
if ($tsu == "" ){
$msgtsu = "Falta Ingresar la Titulo_T.S.U";
//$HTTP_POST_VARS['msgrif'] = $msgrif;
$_POST['msgtsu'] = $msgtsu;
//$claserif = "error";
header("location:actualizar_datoss_.php");
}
}elseif($Seleccion=="3") {
$riff = $_POST['rif']; //extraemos la variable
$tsu = $_POST['titulotsu']; //extraemos la variable
$pos = $_POST['titulopos']; //extraemos la variable
if ($riff == "" ){
$msgrif = "Falta Ingresar la Rif";
//$HTTP_POST_VARS['msgrif'] = $msgrif;
$_POST['msgrif'] = $msgrif;
//$claserif = "error";
header("location:actualizar_datoss_.php");
}else {
if (!is_numeric($riff)) {
$msgrif = "Rif debe ser numerica";
$_POST['msgrif'] = $msgrif;
//$claserif = "error";
header("location:actualizar_datoss_.php");
}
}
if ($tsu == "" ){
$msgtsu = "Falta Ingresar la Titulo_T.S.U";
//$HTTP_POST_VARS['msgrif'] = $msgrif;
$_POST['msgtsu'] = $msgtsu;
//$claserif = "error";
header("location:actualizar_datoss_.php");
}
if ($pos == "" ){
$msgpos = "Falta Ingresar la Titulo_Postgrado";
//$HTTP_POST_VARS['msgrif'] = $msgrif;
$_POST['msgpos'] = $msgpos;
//$claserif = "error";
header("location:actualizar_datoss_.php");
}
}elseif($Seleccion=="4") {
$riff = $_POST['rif']; //extraemos la variable
$tsu = $_POST['titulotsu']; //extraemos la variable
$pos = $_POST['titulopos']; //extraemos la variable
$pre = $_POST['titulopre']; //extraemos la variable
if ($riff == "" ){
$msgrif = "Falta Ingresar la Rif";
//$HTTP_POST_VARS['msgrif'] = $msgrif;
$_POST['msgrif'] = $msgrif;
//$claserif = "error";
header("location:actualizar_datoss_.php");
}else {
if (!is_numeric($riff)) {
$msgrif = "Rif debe ser numerica";
$_POST['msgrif'] = $msgrif;
//$claserif = "error";
header("location:actualizar_datoss_.php");
}
}
if ($tsu == "" ){
$msgtsu = "Falta Ingresar la Titulo_T.S.U";
//$HTTP_POST_VARS['msgrif'] = $msgrif;
$_POST['msgtsu'] = $msgtsu;
//$claserif = "error";
header("location:actualizar_datoss_.php");
}
if ($pos == "" ){
$msgpos = "Falta Ingresar la Titulo_Postgrado";
//$HTTP_POST_VARS['msgrif'] = $msgrif;
$_POST['msgpos'] = $msgpos;
//$claserif = "error";
header("location:actualizar_datoss_.php");
//die;
}
if ($pre == "" ){
$msgpre = "Falta Ingresar la Titulo_Pregrado";
//$HTTP_POST_VARS['msgrif'] = $msgrif;
$_POST['msgpre'] = $msgpre;
//$claserif = "error";
header("location:actualizar_datoss_.php");
}
}else{
$reg = mysql_db_query($dat,"select * from docentes where ceduladoce='$id_usuario'");
if(mysql_num_rows($reg)=='0')
header("location:ingreso.php");
$rif = $_POST['rif'];
$titulotsu = $_POST['titulotsu'];
$titulopre = $_POST['titulopre'];
$titulopos = $_POST['titulopos'];
$fecha = $_POST['fecha'];
$sexo = $_POST['sexo'];
$telefono = $_POST['telefono'];
$correo = $_POST['correo'];
$municipio = $_POST['municipio'];
$parroquia = $_POST['parroquia'];
$direccion = $_POST['direccion'];
$fec = substr($fecha,6,4).'-'.substr($fecha,3,2).'-'.substr($fecha,0,2);
mysql_db_query($dat,"update docentes set rifdoce='$rif', titulotsudoce='$titulotsu', titulopredoce='$titulopre', tituloposdoce='$titulopos', fechanaci='$fec', sexodoce='$sexo', telefodoce='$telefono', correodoce='$correo', codigomuni='$municipio', codigoparr='$parroquia', direcciondoce='$direccion' where ceduladoce='$id_usuario'");
header("location:panel_menu.php");
}
?>
el Mensaje el cual debería salir, después de ser validado algún campo que debería introducir el docente. Es llamado con el siguiente codigo dentro de un span:
<span class="msg"><?php echo $msgrif; ?></span>
Espero tu respuesta por favor y gracias...