Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I don't think your approach will work because you are generating multiple forms, so PHP will only get the one form that is submitted, and you won't be able to save all the changes on your page.</p> <p>You might want to consider using one form and naming your inputs like an array (see <a href="http://php.net/manual/en/faq.html.php#faq.html.arrays" rel="nofollow noreferrer">http://php.net/manual/en/faq.html.php#faq.html.arrays</a>) .</p> <p>e.g. (simplified)</p> <pre><code>&lt;form method="post"&gt; &lt;?php while($box = mysql_fetch_array($box_query)): ?&gt; &lt;!-- div box thing --&gt; &lt;input name="box[&lt;?php echo $box['id'];?&gt;][search_term_1]" value="&lt;?php echo $box['search_term_1']; ?&gt;"&gt; &lt;input name="box[&lt;?php echo $box['id'];?&gt;][search_term_2]" value="&lt;?php echo $box['search_term_2']; ?&gt;"&gt; &lt;input name="box[&lt;?php echo $box['id'];?&gt;][search_term_3]" value="&lt;?php echo $box['search_term_3']; ?&gt;"&gt; &lt;input name="box[&lt;?php echo $box['id'];?&gt;][exc_search_term_1]" value="&lt;?php echo $box['exc_search_term_1']; ?&gt;"&gt; &lt;input name="box[&lt;?php echo $box['id'];?&gt;][exc_search_term_2]" value="&lt;?php echo $box['exc_search_term_2']; ?&gt;"&gt; &lt;input name="box[&lt;?php echo $box['id'];?&gt;][exc_search_term_3]" value="&lt;?php echo $box['exc_search_term_3']; ?&gt;"&gt; &lt;!-- end div box thing --&gt; &lt;?php endwhile; ?&gt; &lt;/form&gt; </code></pre> <p>If you <code>print_r($_POST)</code> after submitting that form you should see that it will be fairly easy to loop over/process.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload