Question: I am trying to make a dropdown list and take three parameters from the user which will be stored in a php file for later use. My current code is :

```html
<body>

  <header>

    <form action="parameter.php" method="post">

      <label class="heading">First</label>
      <select name="First">
        <option value="First-1">First-1</option>
        <option value="First-2">First-2</option>
      </select>
      <input type="submit">

    </form>

    <form action="parameter.php" method="post">
      <label class="heading">Second</label>
      <select name="Second">
        <option value="Second-1">Second-1</option>
        <option value="Second-2">Second-2</option>
      </select>
      <input type="submit">
    </form>

    <form action="parameter.php" method="post">
      <label class="heading">Third</label>
      <select name="Third">
        <option value="Third-1">Third-1</option>
        <option value="Third-2">Third-2</option>
        <input type="submit">
      </select>

    </form>

  </header>

</body>
```

Here, the problem is, I don't want submit button for each parameter, instead there should be only one button for all the parameters. I have tried several things but none is working. 

My php file

```
<?php
echo $_POST['First'];
echo $_POST['Second'];
echo $_POST['Third'];
?> 

```

Where am I going wrong? 

EDIT : Corrected the php code

Answer: 
Just wrap all your selects under one form instead of 3 different forms.
Make sure that the `input` submit is not inside the select tag.

Also, note that your php code is trying to echo parameters that don't exist in the html you shared. The `name` of your select will be the parameter name.

```
<form action="parameter.php" method="post">    

<label class="heading">First</label>
<select name="First" >    
  <option value="First-1">First-1</option>
  <option value="First-2">First-2</option>      
</select>

<label class="heading">Second</label>
<select name="Second" >    
  <option value="Second-1">Second-1</option>
  <option value="Second-2">Second-2</option>     
</select>

<label class="heading">Third</label>
<select name="Third" >    
  <option value="Third-1">Third-1</option>
  <option value="Third-2">Third-2</option>    
</select>

<input type="submit"> 
</form>

```

**PHP**

```
<?php
echo $_POST['First'];
echo $_POST['Second'];
echo $_POST['Third'];
?> 

```
```
<form action="parameter.php" method="post" id="frm">    

   <label class="heading">First</label>
   <select name="First" >    
       <option value="First-1">First-1</option>
       <option value="First-2">First-2</option>      
   </select>

   <label class="heading">Second</label>
   <select name="Second" >    
       <option value="Second-1">Second-1</option>
       <option value="Second-2">Second-2</option>     
   </select>

   <label class="heading">Third</label>
   <select name="Third" >    
       <option value="Third-1">Third-1</option>
       <option value="Third-2">Third-2</option>    
  </select>

  <input type="submit"> 
</form>

```

JQuery AJAX

```
<script>
    $('#frm').on('submit', function(e){
        e.preventDefault();
        $.ajax({
            url : $(this).attr('action'),
            type: "POST",
            dataType: "json",
            data : $(this).serialize(),
            success: function(data)
            {
                console.log(data)
            }
        });
    });
</script>

```

PHP

```
<?php
    echo $_POST['First'];
    echo $_POST['Second'];
    echo $_POST['Third'];
?>

```