Ver Mensaje Individual
  #1 (permalink)  
Antiguo 12/01/2013, 07:05
Souf
 
Fecha de Ingreso: febrero-2005
Ubicación: Valencia
Mensajes: 101
Antigüedad: 19 años, 2 meses
Puntos: 15
Problema tonto con formulario [no recibo nada en $_POST]

Hola,
En una misma página tengo estos dos formularios:
Código HTML:
<h4>Buscar pagos de cuotas de socios</h4>
    <br>
    <form method="post" action="/desarrollo/wp-admin/admin.php?page=socioswp/pagos_de_cuotas.php">
        <input type="hidden" name="buscar_pcuota_enviado" value="si" />
        <table class="form-table">
            <tr valign="top">
                <th scope="row">Número de socio</th>
                <td><input type="text" maxlength="10" size="10" name="buscar_pcuota_numero" value="" /></td>
                <th scope="row">Nombre</th>
                <td><input type="text" maxlength="20" size="20" name="buscar_pcuota_nombre" value="" /></td>
                <th scope="row">Primer Apellido</th>
                <td><input type="text" maxlength="20" size="20" name="buscar_pcuota_apel1" value="" /></td>
            </tr>
            <tr valign="top">
                <th scope="row">Segundo Apellido</th>
                <td><input type="text" maxlength="20" size="20" name="buscar_pcuota_apel2" value="" /></td>
                <th scope="row">Cuota</th>
                <td><select name="buscar_pcuota_tcuota">
                        <option value=-1></option>
                                                    <option value=1>Colaborador (20€)</option>
                                                        <option value=2>Numerario (40€)</option>
                                                </select>
                </td>
                <th scope="row">Forma de pago</th>
                <td><select name="buscar_pcuota_fpago">
                        <option value=-1></option>
                                                    <option value=2>Bankia</option>
                                                        <option value=1>PayPal</option>
                                                </select>
                </td>
            </tr>
            <tr valign="top">
                <th scope="row">Estado</th>
                <td><select name="buscar_pcuota_estado">
                        <option value=-1></option>
                        <option value=0>Pendiente</option>
                        <option value=1>Pagado</option>
                        <option value=2>No Pagado</option>
                    </select>
                </td>
                <th scope="row">Desde</th>
                <td><input type="text" maxlength="10" size="10" name="buscar_pcuota_fini" value="" /><span class="description">dd/mm/aaaa</span></td>
                <th scope="row">Hasta</th>
                <td><input type="text" maxlength="10" size="10" name="buscar_pcuota_ffin" value="" /><span class="description">dd/mm/aaaa</span></td>
            </tr>
        </table>
        <p class="submit">
            <input type="submit" class="button-primary" value="Buscar Pagos de Cuotas" />
        </p>	
    </form> 
Código HTML:
<h3>Nuevo pago de cuota</h3>
<h3></h3>
<form method="post" action="/desarrollo/wp-admin/admin.php?page=socioswp/pagos_de_cuotas.php" enctype="multipart/form-data">
    <input type="hidden" name="MAX_FILE_SIZE" value="98304" />
    <input type="hidden" name="pcuota_enviado" value="si" />
                <table class="form-table">
                    <tr valign="top">
                <th scope="row">Fecha en la que el socio pagó la cuota*</th>
                <td><input type="text" maxlength="10" size="10" name="fecha_pcuota" value="12/01/2013" /><span class="description"> Por defecto la fecha actual.</span></td>
            </tr>
            <tr valign="top">
                <th scope="row">Número de socio que realiza el pago*</th>
                <td><input type="text" maxlength="10" size="10" name="num_socio_pcuota" value="" /></td>
            </tr>
            <tr valign="top">
                <th scope="row">Cuota*</th>
                <td>
                    <select name="tcuota_pcuota">
                                <option value=1>Colaborador (20€)</option>
                                                        <option value=2>Numerario (40€)</option>
                                                </select>
                </td>
            </tr>
            <tr valign="top">
                <th scope="row">Forma de pago*</th>
                <td>
                    <select name="fpago_pcuota">
                                <option value=2>Bankia</option>
                                                        <option value=1>PayPal</option>
                                                </select>
                </td>
            </tr>
            <tr valign="top">
                <th scope="row">Validado por*</th>
                <td><input type="text" readonly maxlength="10" size="10" name="validador_pcuota" value="3" /><span class="description"> Tu número de socio.</span></td>
            </tr>
            <tr valign="top">
                <th scope="row">Estado*</th>
                <td>
                                        <select name="estado_pcuota">
                        <option value=0>Pendiente</option>
                        <option value=1>Pagado</option>
                        <option value=2>No Pagado</option>
                    </select>
                                        </td>
            </tr>
            <tr valign="top">
                <th scope="row">Justificante de pago de la cuota</th>
                <td><input type="file" name="fichero_pcuota" /><span class="description"> Ficheros permitidos: zip. Tamaño máximo 1.5MB.</span></td>
            </tr>
        </table>

                <p class="submit">
            <input type="submit" class="button-primary" value="Añadir Pago de Cuota" />
        </p>
    
</form> 
El primer formulario envía los datos sin problemas, siendo la primera línea del php del target un
Código PHP:
print_r($POST); 
, pero el segundo, no envía nada, siendo el mismo fichero, en cambio, si le cambio el nombre al input oculto pcuota_enviado por cualquier otra cosa, como pquota_enviado o pcuota_enviedo sí que lo recibo en $_POST.
¿Alguna idea? Seguro que es algo super tonto, pero no lo encuentro, siempre me ha funcionado, por lo que debí hacer algún cambio sin querer, el problema es que estoy ofuscado y no lo veo...

Gracias

Última edición por Souf; 12/01/2013 a las 07:18