Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

181
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!