title: How do I pass arguments from one php file to another?
body: <p>I have to make an online shop.
  I generate my products from a database like this:</p>
  
  <pre><code> $sql = "SELECT * FROM wblouses";
                      $result = mysql_query($sql);
                      if (! $result)
                      {
  
                          echo "eroare db  database-item";
                      }
                      else
                          while($db_field = mysql_fetch_assoc($result)) {
                              echo "&lt;div class=\"col-md-4\"&gt;&lt;div class=\"thumbnail\"&gt;&lt;form  method=\"POST\" action=\"addToChart.php\" &gt;&lt;img style=\"display: block;\" src=";
                              echo $db_field["poza"]." height=\"250\" width=\" 400 \"&gt; &lt;p class=\"prices\"&gt;
                                          &lt;span class=\"price\" data-color=\"401\" &gt;
                                                  &lt;span class=\"currentPrice\"&gt; ".$db_field["pret"]."&amp;nbsp;LEI&amp;nbsp;&amp;nbsp;&lt;/span&gt;
                                          &lt;/span&gt;
                                          &lt;input type=\"username\" name=\"username\"&gt;
                                          &lt;select id=\"myselect\" name=\"myselect\"&gt;
                                            &lt;option value=".$db_field["ID"]."&gt;SIZE&lt;/option&gt;
                                            &lt;option value=\"XS\"&gt;XS&lt;/option&gt;
                                            &lt;option value=\"S\"&gt;S&lt;/option&gt;
                                            &lt;option value=\"M\"&gt;M&lt;/option&gt;
                                            &lt;option value=\"L\"&gt;L&lt;/option&gt;
                                          &lt;/select&gt;
                                          &lt;input type=\"submit\" value=\"add to chart\"&gt;
  
                                  &lt;/p&gt;&lt;/form&gt;&lt;button id=\"ilas\" onClick=\"fct(this.id)\"&gt;B3&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;  ";
  
                          }
  </code></pre>
  
  <p>In another .php file I manage a database which represents a list of items selected from the one posted. How do I pass the id of a particular item to another file, I only seem to get the last generated id.</p>
  
  <p>How can I pass some arguments to another php file?
  The problem is that every product has it`s own  generated div,dropdown and button with the same name and ID , how I find out in .php which product I refer to(it always refer to the last added product)?
  @Skrrp
  @TEster</p>