Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6567231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:18:44+00:00 2026-05-25T14:18:44+00:00

i have a form for a sampler who collects different samples of sand from

  • 0

i have a form for a sampler who collects different samples of sand from different beaches and then fills that form. For each location he has to fill those entries. i have made the form as below

<table width="990" border="0" cellspacing="0" cellpadding="0">
    <tr>
        <td>Station Number</td>
        <td><input type="text" name="station_number" size="4"></td>
        <td>Evidence of Runoff</td>
        <td><input type="radio" name="evidence_runoff" value="No">No
            <input type="radio" name="evidence_runoff" value="Yes">Yes</td>
        <td># People</td>
        <td>Beach
            <select name="people_beach">
                <option value="0">0</option>
                <?php for ($b = 1; $b <= 50; $b++) {
                    ?>
                    <option value="<?php echo $b; ?>"><?php echo $b; ?></option>
                <?php }
                ?>
            </select></td>
    </tr>
    <tr>
        <td>Location</td>
        <td><select name="location" >
                <?php while ($row_location = mysql_fetch_assoc($rs_location)) {
                    ?>
                    <option value="<?php echo $row_location['NAME']; ?>"><?php echo $row_location['NAME']; ?></option>
                <?php } ?>
            </select></td>
        <td>Beach Vegetation</td>
        <td><input type="radio" name="beach_vegetation" value="No">
            No
            <input type="radio" name="beach_vegetation" value="Yes">
            Yes</td>
        <td>&nbsp;</td>
        <td>Water
            <select name="people_water">
                <option value="0">0</option>
                <?php for ($b = 1; $b <= 50; $b++) {
                    ?>
                    <option value="<?php echo $b; ?>"><?php echo $b; ?></option>
                <?php }
                ?>
            </select></td>
    </tr>
    <tr>
        <td>Time Taken</td>
        <td><select name="hours">
                <option value="">Hour</option>
                <?php
                for ($x = 1; $x <= 12; $x++) {
                    if (substr($x, 1, 1) == "") {
                        $x = "0" . $x;
                    }
                    ?>
                    <option value="<?php echo $x; ?>"><?php echo $x; ?></option>
                <?php } ?>
            </select>
            <select name="minutes">
                <option value="">Minutes</option>
                <?php
                for ($x = 0; $x <= 59; $x++) {
                    if (substr($x, 1, 1) == "") {
                        $x = "0" . $x;
                    }
                    ?>
                    <option value="<?php echo $x; ?>"><?php echo $x; ?></option>
                <?php } ?>
            </select></td>
        <td>Beach Debris</td>
        <td><input type="radio" name="beach_debris" value="No">
            No
            <input type="radio" name="beach_debris" value="Yes">
            Yes</td>
        <td># Water Fowl</td>
        <td><input type="text" name="water_fowl"></td>
    </tr>
    <tr>
        <td>Water Sports non-moto.</td>
        <td><input type="text" name="water_sports"> </td>
        <td>Water Sports motorized</td>
        <td><input type="text" name="water_sports_motor"> </td>
        <td>Sand Sports or Other</td>
        <td><input type="text" name="sand_sports"> </td>
    </tr>
    <tr>
        <td>Contaminant/Discharge Sources:</td>
        <td colspan="2"><textarea name="contaminant"></textarea></td>
        <td>Significat events taking place on the beach</td>
        <td colspan="2"><textarea name="significant_event"></textarea></td>
    </tr>
</table>

Now what i am in search of is that this is only one record. I want to have a button at the bottom of this table for ADD ANOTHER SAMPLE and by clicking on that this same table is added again to the form and another entry for the sample is made. A sampler can make 5 entries and after that i want to save those values in the database.
Any Idea on How to solve this situation.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T14:18:45+00:00Added an answer on May 25, 2026 at 2:18 pm

    i think you can done this by using ajax request

    when form submit button click

    $('.submit').click(function(e){
    
       e.preventDefault();
    
       $('table').each(function(){
    
            //you can get all values
            var value = $(this).children('.childclass').val();
    
            $.post('ajax/test.html', function(data) {
    
             });
        });
    
    });
    

    you can iterate over each table and get children values and submit to database

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form that has a field pulled from the database as a
I have a form that has all the fields pulled dynamic from a database
I have form where are 2 input fields and then i have dynamic dataTables
I have an existing PHP/MySQL website that relies hugely on form POSTs for things
I have a form that spans multiple pages in jQuery Mobile. I'm using multi-page
I have a sample form with 3 windows. Each window has a label and
I have a form that has Submit button in form of an Image. When
I have a form that does some extensive Javascript stuff before finally POSTing to
I have a form which contains some rows, each has a checkbox in the
I have a form, and want to programmatically alter the help text that displays

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.