Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/04/2008, 14:27
mcarola
 
Fecha de Ingreso: abril-2008
Mensajes: 2
Antigüedad: 16 años, 9 meses
Puntos: 0
alert kjavascript dentro de un switch case en php

Hola a todos..!

quisiera que , por favor alguien me ayudara a resolver este problemita:

tengo el siguiente codigo:

<?php
openConnection();
switch ($op) {
case "crear":
$resultUsr = mysql_query("SELECT CI FROM db_seed.seed_usuario WHERE CI =".$txtCedula)
or die("mod_1: Could not query: " . mysql_error());

if (mysql_num_rows($resultUsr) == 0){


if (!isset($radSexo))
$radSexo = "NULL";
$txtNombre=str_replace("'","''",$txtNombre);
$result = mysql_query("INSERT INTO db_seed.seed_usuario(CI, cedula, Nombre, Apellido, sexo, Activo, Login, Pwd, password,Email, telefono, Tipo, id_tipo, id_region, idCargo, id_cargo, idGrupo, idContratista, id_contratista)
VALUES ('".$txtCedula."','".$txtCedula."','".$txtNombre." ', '".$txtApellido."',
".$radSexo.", 1,'".$txtCedula."','".$txtCedula."','".$txtCedula. "','".$txtEmail."','".$txtTelefono."',
'".$cboTipoCanal."', '".$cboTipoCanal."','".$cboRegion."','".$cboCargo. "', '".$cboCargo."',1,
'".$cboContratista."','".$cboContratista."')")
or die("cre_1: Could not query: " . mysql_error());

$id_usuario = mysql_insert_id();
?>
<script language="javascript" type="text/javascript">
alert ("Usuario registrado existosamente");
document.location.href="index.php";
</script>
<?php

}
break;

default:
echo "Error: Operacion Desconocida <br>";
echo "Operacion =" . $op;

}


?>
*****************

el asunto es que el alert no hace nada... por que? que tengo que hacer. de antemano gracias

la venezolana