Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

184
Visualizações
How to input data from multiple forms into MySQL

I created a 3 form signup page for better css but now I having problem taking input and storing it into my database.

<div class="container">

    <form id="form1">
         <h2> Join Us </h2>
         <input type="text" placeholder="Username" name="username" required />
           <input type="text" placeholder="First Name" name="firstname" required />
           <input type="text" placeholder="Last Name" name="lastname" />
           <div class="btn"> 
           <button type="button" id="login"><a href="login.html"> Login </a></button>
            <button type="button" id="next1"> Next </button>
        </div>
    </form>
    
    <form id="form2">
            <h2> Create Password </h2>
            <input type="password" placeholder="Password" name="password" required />
            <input type="password" placeholder="Confirm Password" required />
       <div class="btn"> 
         <button type="button" id="back1"> Back </button>
         <button type="button" id="next2"> Next </button>
         </div>
    </form>
    
    <form id="form3">
       <h2> Complete Signup </h2>
       <input type="number" placeholder="Mobile number" name="number" required />
       <input type="email" placeholder="E-mail" name="mail" required />
       <div class="btn"> 
         <button type="button" id="back2"> Back </button>
         <button type="submit" id="submit"> Submit </button>
      </div>

</form>

Whenever I try to take input and store it, it only stores the data from last form. Is there any way I can take data from all three forms and store it?

Insert function js

submit.onclick = function submit() {
  form1.method = "post";
  form2.method = "post";
  form3.method = "post";
form3.action = "insert.php"
}
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda