Foros del Web » Programación para mayores de 30 ;) » Bases de Datos General »

Registro de BD usando formulario expandido

Estas en el tema de Registro de BD usando formulario expandido en el foro de Bases de Datos General en Foros del Web. Saludos a todos de nuevos, Tengo un formulario en donde le haces clik en un enlace que dice "agregar" y agregas nuevas celdas en donde ...
  #1 (permalink)  
Antiguo 19/05/2010, 21:26
 
Fecha de Ingreso: octubre-2006
Ubicación: Ciudad Ojeda, Venezuela
Mensajes: 123
Antigüedad: 17 años, 6 meses
Puntos: 0
Registro de BD usando formulario expandido

Saludos a todos de nuevos,

Tengo un formulario en donde le haces clik en un enlace que dice "agregar" y agregas nuevas celdas en donde estas celdas hay que ingresar el nombre y apellido el problemas esta en que como haría para que en mi base de datos (MYSQL) se agregue los datos sin necesidad de hacer cada campo por que no se cuantas celdas se vallan a hacer

Código PHP:
  <title></title>

  <
script type="text/javascript" src="index.php2_files/jquery-latest.js"></script>
  <script type="text/javascript" src="index.php2_files/jquery_002.js"></script>
  <script type="text/javascript" src="index.php2_files/jquery.js"></script>
  <script type="text/javascript" src="index.php2_files/jquery-dynamic-form.js"></script>
  <script type="text/javascript" src="index.php2_files/jquery_003.js"></script>



<script>var test = "";</script>

</head><body id="mainpage">

<a name="up" id="up"></a>



<div id="center">

    <div id="main">

      <div id="contentmn">

            <noscript>
</noscript>
            <div style="width: 745px;" id="content">

                <div class="padding" style="width: 745px; height: 215px">

                    
                    <noscript>
</noscript>
<script>
/* <![CDATA[ */
  var confirma = 0;
  $(document).ready(function(){
    $("#jelForm").tooltip(); 
    $("#jelForm").validate({
            rules:{
                num_casa: {
                  maxlength: 6
                },
                fam_cedula: {
                  minlength: 10,
                  maxlength: 10
                },
                anio_egreso: {
                  maxlength: 4
                },
                promedio: {
                  maxlength: 2
                }
            }
    });
    $("#duplicate").dynamicForm("#plus", "#minus", {limit:9});
    $('input:text').setMask();
    $("#jelForm").submit(function () {
         $(this).validate({
            rules:{
                num_casa: {
                    maxlength: 6
                },
                fam_cedula: {
                  minlength: 10,
                  maxlength: 10
                },
                anio_egreso: {
                  maxlength: 4
                },
                promedio: {
                  maxlength: 2
                }
            }
        });
    });
    $("#jelForm").submit(function (){
        if (confirma == 0 ) {
            alert("Luego de generada la planilla NO PODRÁS MODIFICAR LOS DATOS \n Por favor confirma los datos antes de enviar el formulario.");
            confirma = 1;
            return false;
        } else if (confirma == 1) {
            return true;
        }
    });
  });

/* ]]> */
</script>

<form action="index.php" method="post" name="jelForm" id="jelForm">
  &nbsp;<fieldset id="test" class="mainfieldset">
      <fieldset id="duplicate">
      <table width="570">
        <tbody><tr>
          <td width="232">
            <label for="fam_nombre0">Nombre</label><br>
            <input name="fam_nombre[]" id="fam_nombre0" class="required" 
type="text">
          </td>
          <td width="108">
            <label for="fam_apellido1">Apellido</label><br>
            <input name="fam_apellido[]" id="fam_apellido1" class="required" 
type="text">
          </td>
          <td width="216">
            <label for="fam_cedula3">Cédula</label><br>
            &nbsp;<input name="fam_cedula[]" id="fam_cedula3" class="required" 
alt="99.999.999" type="text"></td>
        </tr>
        <tr>
          <td width="232">
            <p><span>
              <a href="http://www.fundacionjel.org/portal/" id="minus" 
style="display: none;" class="minus">Eliminar Familiar [-]</a>
              <a style="display: inline;" 
href="http://www.fundacionjel.org/portal/" id="plus" class="plus">Agregar 
            Familiar [+]</a>
            </span>
          </td>
          <td width="108"></td>
        </tr>
      </tbody></table>
    </fieldset>
  </fieldset>
  <table width="459">
      <tbody><tr>
      <td><input name="submit" id="submit" value="Enviar" type="submit"></td>
      <td>&nbsp;</td>
    </tr>
  </tbody></table>
</form>
                </div>                

            </div>

        </div>

     </div>

</div></body></html> 

Etiquetas: bd, expandido, registro, formulario
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 18:13.