Ver Mensaje Individual
  #4 (permalink)  
Antiguo 31/05/2006, 13:04
Anita Rubio
 
Fecha de Ingreso: septiembre-2005
Mensajes: 141
Antigüedad: 18 años, 7 meses
Puntos: 0
CONTINUACION...

Código PHP:
<form name="form1" method="POST" action="testpdf.php"> 


  <table width="414" border="0" align="center">
    <tr>
      <td width="131" height="31"><span class="Estilo3">nombre</span></td>
      <td width="273"><span class="Estilo3"><span class="Estilo5">
      <?php
      
if(isset($_POST['nombre'])) 
        echo 
"<input name='nombre' type='text' id='nombre' size='40' maxlength='40' value=".$_POST['nombre'].">";
      else
        echo 
"<input name='nombre' type='text' id='nombre' size='40' maxlength='40' >"
    
?>
      </span></span></td>
    </tr>
    <tr>
      <td height="32"><span class="Estilo3"><span class="Estilo5">apellido</span></span></td>
      <td width="273"><?php
      
if(isset($_POST['apellido'])) 
        echo 
"<input name='apellido' type='text' id='apellido' size='40' maxlength='40' value=".$_POST['apellido'].">";
      else
        echo 
"<input name='apellido' type='text' id='apellido' size='40' maxlength='40' >"
    
?>     </td>
    </tr>
    <tr>
      <td height="31"><span class="Estilo3">disciplina</span></td>
      <td><span class="Estilo5">
        <select name="disciplina" size="1" id="disciplina" onChange="this.form.submit()">
             <option value="0" selected="selected" >Seleccione una Disciplina</option>
              <?php
              $clave
=$_POST['disciplina'];
            
            do {  
                            
                if(
$clave==$row_disciplina['CveClase']){ 
                  echo 
"<option value=\"".$row_disciplina['CveClase']."\" selected>".$row_disciplina['Nombre']."</option>\n";
                }
               else{ 
                 echo 
"<option value=\"".$row_disciplina['CveClase']."\" >"$row_disciplina['Nombre']."</option>\n";
                }
            } while (
$row_disciplina mysql_fetch_assoc($disciplina));
                  
$rows mysql_num_rows($disciplina);
                  if(
$rows 0) {
                      
mysql_data_seek($disciplina0);
                      
$row_disciplina mysql_fetch_assoc($disciplina);
               }
        
           
mysql_free_result($disciplina);
          
?>
        </select>
      </span></td>
    </tr>
    <tr>
      <td height="29" class="Estilo3">Categoria</td>
      <td><p><font color="#0066CC">
          <select name="categoria" size="1" id="categoria" onChange="this.form.submit()"  >
           
      <?php    
      
      
if (!empty($clave)){
            
mysql_select_db($database_PAGINA$PAGINA);
            
$query_categoria "SELECT * FROM subcategorias WHERE CveClase='$clave' ORDER BY Nombre ASC";
            
$categoria mysql_query($query_categoria$PAGINA) or die(mysql_error());
            
$row_categoria mysql_fetch_assoc($categoria);
            
$totalRows_categoria mysql_num_rows($categoria);
            
            echo 
"<option value=\"\"> Seleccione una Categoria </option>";
                
$clave2=$_POST['categoria'];
                
            do {  
            
                if(
$clave2==$row_categoria['CveSub']){ 
                  echo 
"<option value=\"".$row_categoria['CveSub']."\" selected>".$row_categoria['Nombre']."</option>\n";
                }
               else{ 
                 echo 
"<option value=\"".$row_categoria['CveSub']."\" >"$row_categoria['Nombre']."</option>\n";
                }

            } while (
$row_categoria mysql_fetch_assoc($categoria));
            
         }
     else{ 
                 echo 
"<option value=\"\"> Seleccione una Categoria </option>";
         }
        
              
$rows mysql_num_rows($categoria);
              if(
$rows 0) {
                  
mysql_data_seek($categoria0);
                  
$row_categoria mysql_fetch_assoc($categoria);
              }
              
              
mysql_free_result($categoria);
            
?>
          </select>
        </font></p>
      </td>
    </tr>
    <tr>
      <td height="30" class="Estilo3">HORARIO</td>
      <td><font color="#0066CC">
        <select name="hora" size="1" id="hora" onChange="this.form.submit()" >
          >
          <?php
        
        
if (!empty($clave2)){    
            
mysql_select_db($database_PAGINA$PAGINA);
            
$query_horario "SELECT * FROM horarios WHERE CveSub='$clave2' ORDER BY Hora ASC";
            
$horario mysql_query($query_horario$PAGINA) or die(mysql_error());
            
$row_horario mysql_fetch_assoc($horario);
            
$totalRows_horario mysql_num_rows($horario);
            
            echo 
"<option value=\"\"> Seleccione un Horario </option>";
            
$clave3=$_POST['hora'];
            do {  
                
                
$row_horario['Hora']= substr($row_horario['Hora'], 0,-3);


                if(
$clave3==$row_horario['CveHr']){ 
                  echo 
"<option value=\"".$row_horario['CveHr']."\" selected>".$row_horario['Hora']." ".$row_horario['Dia']."</option>\n";
                }
                else{ 
                 echo 
"<option value=\"".$row_horario['CveHr']."\" >"$row_horario['Hora']." ".$row_horario['Dia']."</option>\n";
                    }
          
                } while (
$row_horario mysql_fetch_assoc($horario));
        }
        else{ 
                 echo 
"<option value=\"\"> Seleccione un Horario </option>";
             }
                
                  
$rows mysql_num_rows($horario);
                  if(
$rows 0) {
                      
mysql_data_seek($horario0);
                      
$row_horario mysql_fetch_assoc($horario);
                  }
  
                 
mysql_free_result($horario);
             
            
?>
        </select>
      </font></td>
    </tr>
    <tr>
      <td height="42" class="Estilo3">PERIODO</td>
      <td><span class="Estilo3"><span class="Estilo5">
        <select name="periodo" size="1" id="periodo" >
          <option value="Mayo-Julio" selected>Mayo - Julio</option>
        </select>
      </span></span></td> 
    </tr>
  </table> 
  
  <div align="center">
    <p class="Estilo3">
      <input name="inscribir" type="submit" id="inscribir" value="Inscribir">
    </p>
  </div>
  <input type="hidden" name="MM_insert" value="form1">
  <input name="user" type="hidden" id="user" value="<?php echo $name?>" >
  <span class="Estilo3">
  <input name="nsocio" type="hidden" id="nsocio" value="<?php echo $id?>">
  </span>
  <input name="nomb" type="hidden" id="nomb" value="<?php echo $nom_alum?>">
  <input name="apell" type="hidden" id="apell" value="<?php echo $apellido?>">
  <input name="clase" type="hidden" id="clase" value="<?php echo $disciplina?>">
  <input name="subclase" type="hidden" id="subclase" value="<?php echo $categoria?>">
  <input name="hrario" type="hidden" id="hrario" value="<?php echo $horario?>">
  <input name="period" type="hidden" id="period" value="<?php echo $periodo?>">
</form>

<p align="left" class="Estilo3"> <a href="../inicio_socio.php" onMouseOut="window.status='Tres Marias Residential Golf Club &copy;'"  onMouseOver="window.status='Tres Marias Residential Golf Club &copy;';return true" class="Estilo2">Regresar</a></p>
</body>
</html>
__________________
:ojotes: A n I t A :ojotes: