Ver Mensaje Individual
  #4 (permalink)  
Antiguo 08/08/2010, 11:18
Juampix
 
Fecha de Ingreso: abril-2009
Mensajes: 44
Antigüedad: 10 años, 9 meses
Puntos: 3
Respuesta: Validar campos en FORM y enviar por MAIL

Perdon, me doy cuenta que no he sido muy claro.
El Codigo Funciona y si me guarda los datos en la BD. el error que tengo es que ponga o no los datos obligatorios me sigue mandando el mensaje de :
'Por favor, completa todos los campos obligatorios.'
y el codigo ahi se queda en la ejecucion.
Por otra parte si saco esta pieza de codigo con la que pretendo hacer la validacion y comprovacion de datos obligatorios todo funciona perfecto y se guarda la info en la BD, asi que no creo que el problema este en el Form, pero lo pongo igual de todas formas.

Código HTML:
<table style="font-family:Tahoma, Geneva, sans-serif; background-color:#CCC" width="400" border='0' cellpadding='0' cellspacing='0' align="left" dir="ltr">
    <form action="registro_guarda.php" method="post" enctype="multipart/form-data" name="uploadform">
      <tr style="background-color:#999; color:#FFF">
                  <td width="10" style="height: 30px" class="LoginBgDark"></td>
                  <td colspan="2" width="300" class="LoginHeader" height="20" align="left"><strong>REGISTRO </strong></td>
                  <td width="200">&nbsp;</td>
                  <td width="10" style="height: 30px"></td>
      </tr>
       <tr class="LoginBgLight">
                   <td width="10" style="height: 55px"></td>
                   <td colspan="2" style="height: 55px" width="300" class="TuringHelp">Los campos con (*) son obligatorios.<br /></td>
                   <td width="200"></td>
                   <td width="10" style="height: 55px"></td>
       </tr>
       <tr class="LoginBgLight">
                   <td width="10"></td>
                   <td width="300" class="GrayWriting"><span id='dvMandatoryName' class="RegisterForm"></span>Nombre:</td>
                   <td width="300"><input  type="text" name="nombre" value=""  maxlength="50"/></td>
                   <td width="200">*</td>
                   <td width="10"></td>
       </tr>
        <tr class="LoginBgLight">
                   <td></td>
                   <td class="GrayWriting">&nbsp;</td>
                   <td>&nbsp;</td>
                   <td></td>
                   <td></td>
          </tr>
          <tr class="LoginBgLight">
                   <td width="10"></td>
                   <td width="300" class="GrayWriting">Apelllido:</td>
                   <td width="300"><input  type="text" name="apellido" value=""  maxlength="50"/></td>
                   <td width="200">*</td>
                   <td width="10"></td>
         </tr>
         <tr class="LoginBgLight">
                   <td></td>
                   <td class="GrayWriting">&nbsp;</td>
                    <td>&nbsp;</td>
                   <td></td>
                   <td></td>
         </tr>
          <tr class="LoginBgLight">
                    <td width="10"></td>
                    <td width="300" >Email:</td>
                    <td width="300"><input  type="text" name="email" value=""  maxlength="50"/></td>
                    <td width="200">*</td>
                    <td width="10"></td>
          </tr>
          <tr class="LoginBgLight">
                    <td></td>
                    <td class="GrayWriting">&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td></td>
          </tr>
         <tr class="LoginBgLight">
                   <td width="10"></td>
                    <td width="300" >Profesión:</td>
                   <td width="300"><input  type="text" name="profesion" value=""  maxlength="50"/></td>
                   <td width="200">*</td>
                    <td width="10"></td>
         </tr>
          <tr class="LoginBgLight">
                   <td></td>
                   <td class="GrayWriting">&nbsp;</td>
                   <td>&nbsp;</td>
                   <td></td>
                   <td></td>
        </tr>
          <tr class="LoginBgLight">
                   <td width="10"></td>
                   <td width="300" class="GrayWriting">Ciudad:</td>
                   <td width="300"><input  type="text" name="ciudad" value=""  maxlength="25"/></td>
                   <td width="200"></td>
                   <td width="10"></td>
         </tr>
          <tr class="LoginBgLight">
                   <td></td>
                   <td class="GrayWriting">&nbsp;</td>
                   <td>&nbsp;</td>
                   <td></td>
                   <td></td>
         </tr>
          <tr class="LoginBgLight">
                   <td width="10"></td>
                   <td width="300" class="GrayWriting">Institucion:</td>
                  <td width="300"><input type="text" name="institucion" value=""  maxlength="25"/></td>
                  <td width="200"></td>
                  <td width="10"></td>
          </tr>
         <tr class="LoginBgLight">
                   <td></td>
                   <td class="GrayWriting">&nbsp;</td>
                   <td>&nbsp;</td>
                   <td></td>
                   <td></td>
        </tr>
         <tr class="LoginBgLight">
                   <td width="10"></td>
                   <td width="300" class="GrayWriting">Matricula:</td>
                   <td width="300"><input  type="text" name="matricula" value=""  maxlength="25"/></td>
                   <td width="200">&nbsp;</td>
                   <td width="10"></td>
          </tr>
         <tr class="LoginBgLight">
                   <td colspan="5" style="height: 10px"></td>
          </tr>
          <tr class="LoginBgLight">
                    <td width="10" style="height: 30px"></td>
                    <td width="300" style="height: 30px" colspan="2" class="TuringHelp">&nbsp;</td>
                    <td width="200"></td>
                    <td width="10" style="height: 30px"></td>
           </tr>
           <tr class="LoginBgLight">
                    <td width="10">&nbsp;</td>
                    <td width="300" class="GrayWriting">Comentario:</td>
                    <td colspan="2" class="GrayWriting"><textarea name="comentario" cols=32 rows=6></textarea> </td>
                    <td width="10"></td>
           </tr>
           <tr class="LoginBgLight">
                    <td width="10">&nbsp;</td>
                    <td colspan="2" style="height: 20px; width: 300px;"></td>
                    <td width="10">&nbsp;</td>
           </tr>
           <tr class="LoginBgLight">
                    <td width="10"></td>
                    <td width="300" class="GrayWriting"></td>
                    <td width="300"><input name="submit" type="submit" id="submit" value="Registrar"></form></td>
                    <td width="200"></td>
                    <td width="10"></td>
          </tr>
          <tr class="LoginBgLight">
                    <td colspan="5" style="height: 10px"></td>
          </tr>
                                
</table>