hola amigos tengo un problemita con dos forms que estoy manejando en el mismo archivo php, lo que me pasa es lo siguiente:
en el form1 realizo una operacion de inserccion la cual al darle clik al boton que de type submit el llega al action y va a un archivo en donde hace la inserccion(eso esta bien) y en el segundo form2 trato de hacer una consulta por codigo que al darle click al bton consultar me sale error.. aqui les dejo el codigo para que tengan una idea mas precisa...
Código PHP:
Ver original//**************busqueda de inscripciones***********************
if ($_REQUEST["btn_buscar"]!="" && $_REQUEST["busqueda"]!=""){
$filtro = "Cod_Est=".$_REQUEST["busqueda"];
else
$filtro = "AND (Cod_Inscripcion_Est = '%".$_REQUEST["busqueda"]."%' or Cod_Inscripcion_Est = '%".$_REQUEST["busqueda"]."%')";
}else{
$mensaje = "Por favor Digite un Nombre para la Busqueda";
}
$result = mysql_query("SELECT * FROM estudiante e, inscripcion_est_doc ins,programas pro WHERE e.Cod_Est = ins.Cod_Est AND e.Cod_Programa = pro.Cod_Programa; ".$filtro.";");
if($num_reg==0){
echo "No se encontraron Registros";
}
Código HTML:
Ver original<form id="form1" name="form1" method="post" action="guardar_inscrip_D.php"> <div id=idB1 style="display:none" > <table width="100%" border="0" cellpadding="0" cellspacing="0"> <td colspan="7" align="center">Planilla de Inscripcion Deportiva Interfacultades
</td> <td width="23%">Disiplinas Deportivas
</td> <td width="25%"><select name="d_deport" id="d_deport"> <option selected="selected" value="">[Seleccione Disiplina]
</option> <?php
while($fil = mysql_fetch_array($result3)){
if($fil["Cod_Grupo_Dep"] == $fila2["Cod_Grupo_Dep"])
echo "<option selected='' value ='". $fil["Cod_Grupo_Dep"]."'>". $fil["Nom_Grupo"]."
</option>";
else
echo "
<option value ='". $fil["Cod_Grupo_Dep"]."'>". $fil["Nom_Grupo"]."
</option>";
}
?>
<td width="1%"> </td> <select name="sexo" id="sexo" > <td>Nombre del Equipo
</td> <td><input type="text" name="equipo_new" id="equipo_new" style="border-color:#000000" /></td> <input name="txtfechasolicita" type="text" id="txtfechasolicita" style="border-color:#000000" size="15" value="<? echo $txtfechasolicita ?>" />
<td height="32">Nombre Delegado
</td> <td><input type="text" name="name_delegado" id="name_delegado" style="border-color:#000000" value="<?php echo''.$_SESSION['nombreUsuario'].' ';?>" readonly="readonly" />
</td> <select name="programas" id="programas"> <option selected="selected" value="">[Seleccione su programa]
</option> <?php
while($fil = mysql_fetch_array($result4)){
if($fil["Cod_Programa"] == $fila2["Cod_Programa"])
echo "<option selected='' value ='". $fil["Cod_Programa"]."'>". $fil["Nom_Programa"]."
</option>";
else
echo "
<option value ='". $fil["Cod_Programa"]."'>". $fil["Nom_Programa"]."
</option>";
}
?>
<td><input type="text" name="telefono" id="telefono" style="border-color:#000000" /></td> <td colspan="4" align="center"><input type="submit" name="btn_guardar" id="btn_guardar" value="Guardar" /></td>
<form action="InscripcionEquipos.php" method="get" name="form2" id="form2"> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <td align="center">Intengrantes del Equipo
</td> <input name="busqueda" style="border-color:#000000" type="text" id="busqueda" value= "<?php echo $_GET[busqueda];?>"/>
<input name="btn_buscar" type="submit" id="btn_buscar" value="Consultar" />
<table width="655" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000"> <td width="60" bgcolor="#DFDF00">N
°</td> <td width="150" bgcolor="#DFDF00">Nombre y Apellido
</td> <td width="120" bgcolor="#DFDF00">Codigo
</td> <td width="90" bgcolor="#DFDF00">Semestre
</td> <td width="120" bgcolor="#DFDF00">Programa
</td> <td width="133" bgcolor="#DFDF00" align="center">Accion
</td> <?php
while($row3 = @mysql_fetch_array($result)){
?>
<td height="26" bgcolor="#FFFFC6"><label> <input name="Cod_Inscrip_Est" type="text" readonly="readonly" id="Cod_Inscrip_Est" value="<?php echo $row3["Cod_Inscripcion_Est"]; ?>" size="10" />
<input name="nombre_com" type="text" readonly="readonly" id="nombre_com" value="<?php echo $row3["Nombre1"];?> <?php echo $row3["Nombre2"];?> <?php echo $row3["Apellido1"];?> <?php echo $fila["Apellido2"];?>" size="25" />
<input name="Cod_Est" type="text" id="Cod_Est" value="<?php echo $row3["Cod_Est"]; ?>" size="20" readonly="readonly" />
<input name="Semestre" type="text" id="Semestre" value="<?php echo $row3["Semestre"]; ?>" readonly="readonly" size="15" />
<input name="Nom_Programa" type="text" id="Nom_Programa" value="<?php echo $row3["Nom_Programa"]; ?>" size="20" readonly="readonly" />
<td bgcolor="#FFFFC6"><input type="button" name="Submit3" value="Agregar Participante" onclick="javascript: if(ValidarBeneficiario()){ AgregarBeneficiario('ContenidoBeneficiario');LimpiarBeneficiario();}" id="Submit3"/></td> <?php }?>
<div id='ContenidoBeneficiario'> <table width="100%" border="1" align="center" cellpadding="0" cellspacing="1"> <td width="24%" bgcolor="#DFDF00"><div align="center">Paricipantes
</div></td>
el problema creo que es que al darle clik el sube y esta revisando el action del form1 quiciera saber como darle una solucion esto
Gracias....