Jump to content
Fórum Script Brasil
  • 0

Check Box


Adilson-Colabore Sistemas

Question

tenho o seguinte código:

<form method='POST' action='index.php?cad=20&grava=1' name='frm_cesta' autocomplete='off'><br>
<div class='item'><h5>Vendedor Responsável:</h5>
<select name="pid_vendedor" id="pid_vendedor">
    <?php 
    require_once("funcoes/pes_pessoas.php");
    getPessoa("V", "select_vendedor");
    ?>
</select>


#############################################################################
#############################################################################
#############################################################################
</div>
<div class='item'><h5>Selecione os Dependentes:<br></h5>
<?for($b=0;$b<$a;$b++){
    echo"<div class='item'><input type=checkbox name='dep[]' id='$arrayCod[$a]'>$arrayDep[$b]<br/></div>";
}?>
</div>
#############################################################################
#############################################################################
#############################################################################


<div class='item'><h5>Cliente:</h5> 
<input type="hidden" name="pcliente" id="pcliente" value="<?php echo $id_cliente; ?>"><?php echo "$cliente"; ?>
</div>

<div class='item'> <h5>Data do Pedido:</h5> <?php echo date ( "d/m/Y" ); ?> 
<input type='hidden' name='pdata_pedido' id='pdata_pedido' value='<?php echo date ( "Y-m-d H:i:s" ); ?>'>
</div>

<?php

$prazo_entrega = retornaValorCampo ( "PRAZO_ENTREGA", "erp_instituicao", "id = $id_instituicao" );

$valor_sinal = retornaValorCampo ( "SINAL_PADRAO", "erp_instituicao", "id = $id_instituicao" );

$data_entrega = date ( "d/m/Y", mktime ( 0, 0, 0, date ( "m" ), date ( "d" ) + $prazo_entrega, date ( "Y" ) ) );
#$data_entrega = formataData($data_entrega, false);

?>

<div class='item'><br>
<h5>Dt Prevista da Entrega:</h5>
<input type="text" size="11" value="<?php echo $data_entrega; ?>" name="pdataentrega" id="pdataentrega"><?php echo "<b id='ok'>*</b> +$prazo_entrega Dias"; ?>
</div>

<div class='item'><br>
<h5>Sinal:</h5>
<input type="text" size="4" maxlengh="5" value="<?php echo $valor_sinal; ?>" name="pvalorsinal" id="pvalorsinal"> <?php echo "<b id='ok'>*</b>(%)"; ?>
</div>

<div class='item'><br>
<h5>Observações:</h5>
<textarea rows="5" cols="30" name="pobs" id="pobs"> </textarea>
</div>

<?php 
    require_once("funcoes/erp_tipo_cliente_indireto.php");
    echo"<div class='item'><h5>Tipo de Cliente Indireto:</h5>
         <select name='p_tipoCliente' onchange=\"getConteudo('lista_clientes_pedidos','pedidos/lista_clientes_pedidos', document.frm_cesta.p_tipoCliente.value, 0);\">";
            getTipoClienteIndireto(0, "select");
    echo"</select> </div>                                       
    ";            

echo "<div id='lista_clientes_pedidos'></div>";
?>
    
<div class='item'><br> <h5> </h5> <input type="submit" value="Salvar"> </div>

queria fazer uma estrutura para pegar todos os valores checados(parte que está em destaque) e envia-los para página...

como fazer?

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Cara isso é de PHP, mas vamos lá. Cada check box tem um name, visto que mais de uma pode ser selecionada, diferentemente do "radio" onde o grupo deve ter o mesmo name. Ao submeter o formulário você vai pegar o valor com uma das superglobais $_POST[name_check_box]; $_GET[] ou $_REQUEST[]. É essa sua dúvida?

E cuidado com o <? ?>, procure usar o <?php ?>.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...