Form - A part does not send

Asked

Viewed 25 times

0

I’m not getting to make my form work in one part, I saw and reviewed I couldn’t solve.

From the "Vehicle data and related data", is not sending to the BD.

Name of the table: website

Columns: id, titl, descriptio, websit, category, tipovei, portamalas, veiproprio ,tipoalvara, exerceremun, tempotaxista, usufuirtaxi, maqcartao

Thanks in advance!

save php.:

<?php

$db = new PDO("mysql:host=ip;dbname=db","login","senha");

if(isset($_POST['save'])){
    $id = uniqid();
    $name = $_POST['name'];
    $email = $_POST['email'];
    $phone = $_POST['phone'];
    $address = $_POST['address'];
    $username = $_POST['username'];
    $password = md5($_POST['password']);
    $title = $_POST['title'];
    $description = $_POST['description'];
    $sites = $_POST['sites'];
    $category = $_POST['category'];
    $cidade = $_POST['cidade'];
    $cep = $_POST['cep'];
    $telrecado = $_POST['telrecado'];
    $cel = $_POST['cel'];
    $cidadenatural = $_POST['cidadenatural'];
    $dataNas = $_POST['dataNas'];
    $cpf = $_POST['cpf'];
    $rg = $_POST['rg'];
    $condutax = $_POST['condutax'];
    $datecondutax = $_POST['datecondutax'];
    $alvara = $_POST['alvara'];
    $alvaravalidade = $_POST['alvaravalidade'];
    $orgaoemissor = $_POST['orgaoemissor'];
    $nit = $_POST['nit'];
    $ccm = $_POST['ccm'];
    $cnh = $_POST['cnh'];
    $validcnh = $_POST['validcnh'];
    $escolaridade = $_POST['escolaridade'];
    $estadocivil = $_POST['estadocivil'];
    $dependentes = $_POST['dependentes'];
    $nameconjunge = $_POST['nameconjunge'];
    $namebanco = $_POST['namebanco'];
    $ag = $_POST['ag'];
    $nconta = $_POST['nconta'];
    $tipoconta = $_POST['tipoconta'];
    $tipovei = $_POST['tipovei'];
    $portamalas = $_POST['portamalas'];
    $veiproprio = $_POST['veiproprio'];
    $tipoalvara = $_POST['tipoalvara'];
    $exerceremun = $_POST['exerceremun'];
    $tempotaxista = $_POST['tempotaxista'];
    $usufuirtaxi = $_POST['usufuirtaxi'];
    $maqcartao = $_POST['maqcartao'];


    $stat1 = $db->prepare("insert into about values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
    $stat1->bindParam(1, $id);
    $stat1->bindParam(2, $name);
    $stat1->bindParam(3, $email);
    $stat1->bindParam(4, $phone);
    $stat1->bindParam(5, $address);
    $stat1->bindParam(6, $cidade);
    $stat1->bindParam(7, $cep);
    $stat1->bindParam(8, $telrecado);
    $stat1->bindParam(9, $cel);
    $stat1->bindParam(10, $cidadenatural);
    $stat1->bindParam(11, $dataNas);
    $stat1->bindParam(12, $cpf);
    $stat1->bindParam(13, $rg);
    $stat1->bindParam(14, $condutax);
    $stat1->bindParam(15, $datecondutax);
    $stat1->bindParam(16, $alvara);
    $stat1->bindParam(17, $alvaravalidade);
    $stat1->bindParam(18, $orgaoemissor);
    $stat1->bindParam(19, $nit);
    $stat1->bindParam(20, $ccm);
    $stat1->bindParam(21, $cnh);
    $stat1->bindParam(22, $validcnh);
    $stat1->bindParam(23, $escolaridade);
    $stat1->bindParam(24, $estadocivil);
    $stat1->bindParam(25, $dependentes);
    $stat1->bindParam(26, $nameconjunge);
    $stat1->bindParam(27, $namebanco);
    $stat1->bindParam(28, $ag);
    $stat1->bindParam(29, $nconta);
    $stat1->bindParam(30, $tipoconta);
    $stat1->execute();
    $stat2 = $db->prepare("insert into account values(?,?,?)");
    $stat2->bindParam(1, $id);
    $stat2->bindParam(2, $username);
    $stat2->bindParam(3, $password);
    $stat2->execute();
    $stat3 = $db->prepare("insert into website values(?,?,?,?,?,?,?,?,?,?,?,?,?)");
    $stat3->bindParam(1, $id);
    $stat3->bindParam(2, $title);
    $stat3->bindParam(3, $description);
    $stat3->bindParam(4, $sites);
    $stat3->bindParam(5, $category);
    $stat3->bindParam(6, $tipovei);
    $stat3->bindParam(7, $portamalas);
    $stat3->bindParam(8, $veiproprio);
    $stat3->bindParam(9, $tipoalvara);
    $stat3->bindParam(10, $exerceremun);
    $stat3->bindParam(11, $tempotaxista);
    $stat3->bindParam(12, $usufuirtaxi);
    $stat3->bindParam(13, $maqcartao);
    $stat3->execute();
    header('Location: save.php');
}

?>

HTML FORM:

        <form id="form" action="save.php" method="POST">
            <div style="width: 100%; height: 100%;" class="wizards">
                <div class="progressbar">
                    <div class="progress-line" data-now-value="12.11" data-number-of-steps="5" style="width: 12.11%;"></div> <!-- 19.66% -->
                </div>
                <div class="form-wizard active">
                    <div class="wizard-icon"><i class="fa fa-file-text-o"></i></div>
                    <p>Termos</p>
                </div>
                <div class="form-wizard">
                    <div class="wizard-icon"><i class="fa fa-user"></i></div>
                    <p>Dados Pessoais</p>
                </div>
                <div class="form-wizard">
                    <div class="wizard-icon"><i class="fa fa-key"></i></div>
                    <p>Conta</p>
                </div>
                <div class="form-wizard">
                    <div class="wizard-icon"><i class="fa fa-globe"></i></div>
                    <p>Dados do veículo</p>
                </div>
                <div class="form-wizard">
                    <div class="wizard-icon"><i class="fa fa-check-circle"></i></div>
                    <p>Fim</p>
                </div>
            </div>
            <fieldset>
                <iframe src="license_chame.txt"></iframe>
                <label class="form-check-label">
                    <input class="form-check-input" name="concorda" type="checkbox" value="concordou"> Eu li e concordo com os termos de uso
                </label>
                <div class="wizard-buttons">
                    <button type="button" class="btn btn-next">Próximo</button>
                </div>
            </fieldset>
            <fieldset>
            <h4>Dados Pessoais</h4>
              <div class="form-row">
  <div class="form-group col-md-4">
    <label for="inputAddress">Nome</label>
    <input type="text" name="name" class="form-control" required placeholder="Nome completo">
  </div>
    <div class="form-group col-md-3">
      <label for="inputEmail4">Email</label>
      <input type="email" name="email" class="form-control" required placeholder="Email">
    </div>
    <div class="form-group col-md-3">
      <label for="inputEmail4">Telefone</label>
      <input type="tel" name="phone" class="form-control" required placeholder="Seu telefone">
    </div>
    <div class="form-group col-md-2">
      <label for="inputEmail4">Telefone 2</label>
      <input type="tel" name="tel" class="form-control" required placeholder="Telefone recado">
    </div>
  </div>
  <div class="form-row">
  <div class="form-group col-md-2">
    <label for="inputAddress">Celular</label>
    <input type="tel" name="cel" class="form-control"required placeholder="Seu Celular">
  </div>
    <div class="form-group col-md-2">
      <label for="inputEmail4">CEP</label>
      <input type="text" name="cep" class="form-control" placeholder="00000-000">
    </div>
    <div class="form-group col-md-2">
      <label for="inputEmail4">Cidade</label>
      <input type="text" name="cidade" class="form-control" placeholder="Ex: São Paulo - SP">
    </div>
    <div class="form-group col-md-2">
      <label for="inputEmail4">Naturalidade</label>
      <input type="text" name="cidadenatural" class="form-control" placeholder="Ex: São Paulo - SP">
    </div>
    <div class="form-group col-md-4">
      <label for="inputEmail4">Nome do Cônjunge</label>
      <input type="text" name="nameconjunge" class="form-control" placeholder="Nome Completo">
    </div>
  </div>
  <div class="form-row">
  <div class="form-group col-md-8">
    <label for="inputAddress">Endereço</label>
    <input type="text" name="address" class="form-control" id="inputAddress" placeholder="Rua, bairro, número ">
  </div>
  <div class="form-group col-md-2">
      <label for="inputZip">RG</label>
      <input type="text" name="rg" class="form-control" >
    </div>
    <div class="form-group col-md-2">
      <label for="inputZip">Orgão Emissor</label>
      <input type="text" name="orgaoemissor" class="form-control" >
    </div>
  </div>

  <div class="form-row">
    <div class="form-group col-md-2">
      <label for="inputState7">Escolaridade</label>
      <select name="escolaridade" id="inputState7" class="form-control">
        <option value="0" selected>Selecione...</option>
                <option value="Ensino fundamental - Completo" >Ensino fundamental - Completo</option>
                <option value="Ensino fundamental - Incompleto">Ensino fundamental - Incompleto</option>
                <option value="Nivel Medio (2º grau) - Completo">Nivel Medio (2º grau) - Completo</option>
                <option value="Nivel Medio (2º grau) - Incompleto">Nivel Medio (2º grau) - Incompleto</option>
                <option value="Superior  - Completo">Superior  - Completo</option>
                <option value="Superior - Cursando">Superior - Cursando</option>
                <option value="Pós-graduação">Pós-graduação</option>
                <option value="Mestrado">Mestrado</option>
                <option value="Doutorado">Doutorado</option>
                <option value="Pós-doutorado">Pós-doutorado</option>
      </select>
     </div>
     <div class="form-group col-md-2">
      <label for="inputState6">Estado Civíl</label>
      <select name="estadocivil" id="inputState6" class="form-control">
        <option value="0" selected>Selecione...</option>
        <option value="Solteiro">Solteiro</option>
        <option value="Casado">Casado</option>
        <option value="Separado">Separado</option>
        <option value="Divorciado">Divorciado</option>
        <option value="Viúvo">Viúvo</option>
        <option value="Amasiado">Amasiado</option>
      </select>
     </div>
     <div class="form-group col-md-2">
      <label for="inputZip">CPF</label>
      <input type="text" name="cpf" class="form-control" >
     </div>
     <div class="form-group col-md-2">
      <label for="inputZip">Data de Nascimento</label>
      <input type="date" name="dataNas" class="form-control" >
     </div>
     <div class="form-group col-md-2">
      <label for="inputZip">NIT/INSS</label>
      <input type="text" name="nit" class="form-control" >
     </div>
     <div class="form-group col-md-2">
      <label for="inputZip">CCM</label>
      <input type="text" name="ccm" class="form-control" >
     </div>
  </div>
  <h4>Informações referente á confirmações</h4>
   <div class="form-row">
  <div class="form-group col-md-2">
      <label for="inputZip">Condutax</label>
      <input type="text" name="condutax" class="form-control" >
    </div>
    <div class="form-group col-md-2">
      <label for="inputZip">Validade</label>
      <input type="date" name="datecondutax" class="form-control" >
    </div>
    <div class="form-group col-md-2">
      <label for="inputZip">Alvará</label>
      <input type="text" name="alvara" class="form-control" >
    </div>
    <div class="form-group col-md-2">
      <label for="inputZip">Validade</label>
      <input type="date" name="alvaravalidade" class="form-control" >
    </div>
    <div class="form-group col-md-2">
      <label for="inputZip">CNH</label>
      <input type="text" name="cnh" class="form-control" >
    </div>
    <div class="form-group col-md-2">
      <label for="inputZip">Validade CNH</label>
      <input type="date" name="validcnh" class="form-control" >
    </div>
  </div>
  <h4>Dados da conta para devolução do IRRF: (BCO ITAÚ OU BCO BRADESCO)</h4>
  <div class="form-row">
  <div class="form-group col-md-3">
      <label for="inputZip">Banco</label>
      <input type="text" name="namebanco" class="form-control" placeholder="Nome do Banco" >
    </div>
    <div class="form-group col-md-3">
      <label for="inputZip">Agência</label>
      <input type="text" name="ag" class="form-control" placeholder="Número da agência" >
    </div>
    <div class="form-group col-md-3">
      <label for="inputZip">Conta</label>
      <input type="text" name="nconta" class="form-control" placeholder="Número da conta-0" >
    </div>
    <div class="form-group col-md-3">
      <label for="inputState5">Tipo da conta</label>
      <select name="tipoconta" id="inputState5" class="form-control">
        <option value="0" selected>Selecione...</option>
        <option value="CC - Conta corrente">CC - Conta corrente</option>
        <option value="CP - Conta Poupança">CP - Conta Poupança</option>
      </select>
     </div>
  </div>
         <div class="wizard-buttons">
                    <button type="button" class="btn btn-previous">Anterior</button>
                    <button type="button" class="btn btn-next">Próximo</button>
                </div>
            </fieldset>
            <fieldset>
                <h4>Criar Conta</h4>
                <div class="form-group">
                    <label>Usuário</label>
                    <input type="text" name="username" class="form-control" placeholder="Nome de usuário"/>
                </div>
                <div class="form-group">
                    <label>Senha</label>
                    <input type="password" name="password" class="form-control" placeholder="Senha"/>
                </div>
                <div class="wizard-buttons">
                    <button type="button" class="btn btn-previous">Anterior</button>
                    <button type="button" class="btn btn-next">Próximo</button>
                </div>
            </fieldset>
            <fieldset>
                    <h4>Dados do veículo e afins</h4>
                    <div class="form-row">
                    <div class="form-group col-md-2">
                        <label for="inputZip">Placa</label>
                        <input type="text" name="title" class="form-control" >
                    </div>
                    <div class="form-group col-md-4">
                        <label for="inputZip">Marca/Modelo/ano</label>
                        <input type="text" name="description" class="form-control" >
                    </div>
                    <div class="form-group col-md-2">
      <label for="inputState1">Tipo perua</label>
      <select name="tipovei" id="inputState1" class="form-control">
        <option value="0" selected>Selecione...</option>
        <option value="Sim">Sim</option>
                <option value="Não">Não</option>
      </select>
     </div>
     <div class="form-group col-md-2">
      <label for="inputState2">Porta Malas</label>
      <select name="portamalas" id="inputState2" class="form-control">
        <option value="0" selected>Selecione...</option>
        <option value="Livre">Livre</option>
        <option value="Tanque de Gás">Tanque de Gás</option>
      </select>
     </div>
     <div class="form-group col-md-2">
      <label for="inputState3">Veículo Próprio</label>
      <select name="veiproprio" id="inputState3" class="form-control">
        <option value="0" selected>Selecione...</option>
        <option value="Sim">Sim</option>
        <option value="Não">Não</option>
      </select>
     </div>
    </div>
    <h4>Outras informações</h4>
    <div class="form-row">
    <div class="form-group col-md-4">
      <label for="inputZip">Tipo do Alvará</label>
      <select name="tipoalvara" id="inputZip" class="form-control">
        <option value="0" selected>Selecione...</option>
        <option value="Próprio">Próprio</option>
        <option value="Co-Proprietário">Co-Proprietário</option>
        <option value="Preposto">Preposto</option>
        <option value="Segundo Motorista">Segundo Motorista</option>
      </select>
     </div>
     <div class="form-group col-md-4">
    <label for="inputZip">Nome do Titular</label>
    <input type="text" name="website" class="form-control" placeholder="Nome completo" >
    </div>
    <div class="form-group col-md-4">
    <label for="inputZip">Telefone</label>
    <input type="text" name="category" class="form-control" >
    </div>
    </div>  
    <div class="form-row">
        <div class="form-group col-md-6">
    <label for="inputZip">Exerce outra atividade além de taxista?</label>
    <input type="text" name="exerceremun" class="form-control" placeholder="Se sim, qual?" >
    </div>
    <div class="form-group col-md-6">
    <label for="inputZip">Há quanto tempo exerce a profissão de taxista?</label>
    <input type="text" name="tempotaxista" class="form-control" >
    </div>
    </div>
    <div class="form-row">
    <div class="form-group col-md-6">
    <label for="inputZip">Já usufrui de outras rádio táxi?</label>
    <input type="text" name="usufuirtaxi" class="form-control" placeholder="Se sim, qual?">
    </div>
    <div class="form-group col-md-6">
    <label for="inputZip">Possui máquina de cartão de crédito?</label>
    <input type="text" name="maqcartao" class="form-control" placeholder="Se sim, qual?">
    </div>
    </div>
              <div class="wizard-buttons">
                    <button type="button" class="btn btn-previous">Anterior</button>
                    <button type="button" class="btn btn-next">Próximo</button>
                </div>
            </fieldset>
            <fieldset>
                <div class="jumbotron text-center">
                <h4>Estou ciente que na demissão/desligamento deverei informar por escrito com o prazo de 30 dias de antecedência.<br></h4>
                </div>
                <div class="wizard-buttons">
                    <button type="button" class="btn btn-previous">Anterior</button>
                    <button type="submit" name="save" class="btn btn-primary btn-submit">Enviar</button>
                </div>
            </fieldset>
        </form>
  • you tried to use a print_r($_POST) to see if all the data is coming in "if(isset($_POST['save']))" ?

  • No. But I’ll see!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.