<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1019012" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1019012</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/how-do-i-update-mysql-table-php-submitted-form#comment-1113611</link>
    <description> &lt;p&gt;Okay, boys and girls, don&#039;t pass out!&lt;/p&gt;
&lt;p&gt;I didn&#039;t get the good code working, but I have three versions, lol. The one that was closest to my original thought is the one that&#039;s fully working. Now I have to go back and understand what ROB is doing (so close, I am, so close) and then, what Mark is doing. This is so good, to have different ways of doing the same thing to see how they work.&lt;/p&gt;
&lt;p&gt;Anyway!&lt;/p&gt;
&lt;p&gt;LOOK!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.synapticimpulse.com/forsale.php&quot; class=&quot;bb-url&quot;&gt;synapticimpulse.com/forsale.php&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Heh. Not the same page, an entirely different page, with the checkboxes and submit buttons hidden and the update script password protected, but the main list totally displayed.&lt;/p&gt;
&lt;p&gt;WHEE!&lt;/p&gt;
 </description>
     <pubDate>Thu, 05 Sep 2002 08:27:21 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1113611 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/how-do-i-update-mysql-table-php-submitted-form#comment-1113547</link>
    <description> &lt;p&gt;*rofl* oh dear, I knew I was forgetting something!&lt;/p&gt;
&lt;p&gt;Here&#039;s the plan:&lt;/p&gt;
&lt;p&gt;1. Figure out how to make this work (before I move, hopefully, I&#039;ll be working on it again tomorrow).&lt;br /&gt;
2. Once it&#039;s working, figure out how to add and delete whole items (not just checkboxes).&lt;br /&gt;
3. Something happens here.&lt;br /&gt;
4. I become a master programmer and rule the world...&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/big.png&quot; title=&quot;Laughing out loud&quot; alt=&quot;Laughing out loud&quot; class=&quot;smiley-content&quot; /&gt; in the meantime, thank you both for your example code, your time, and your patience with me figuring out how this works. I&#039;m glad I had it half right on the counting, and I understand the list concept for getting the # of items (the MySQL book and site were misleading, darn their souls!).&lt;/p&gt;
&lt;p&gt;Thanks for the very thorough explanation of the arrays, ROB. I&#039;m familiar with multi-dimensional arrays (and referencing them in PHP thanks to Mark) but my foray in MySQL means I don&#039;t have the cognitive infrastructure to understand how this is all actually put together in the language (PHP? MySQL? Which one is doing what has been tripping me up).&lt;/p&gt;
&lt;p&gt;You guys, quite simply, rock.&lt;/p&gt;
 </description>
     <pubDate>Wed, 04 Sep 2002 07:23:18 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1113547 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/how-do-i-update-mysql-table-php-submitted-form#comment-1113532</link>
    <description> &lt;p&gt;You know what I don&#039;t see on that list?&lt;br /&gt;
&quot;Send Mark china to pack&quot;&lt;/p&gt;
&lt;p&gt;That must be why it hasn&#039;t arrived yet.&lt;/p&gt;
 </description>
     <pubDate>Wed, 04 Sep 2002 03:52:22 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1113532 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/how-do-i-update-mysql-table-php-submitted-form#comment-1113531</link>
    <description> &lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;/* COUNT ROWS IN MOVING TABLE */&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$query_count &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;SELECT MAX(task_id) FROM moving\&quot;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$result&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = mysql_query(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$query_count&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;list(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$items&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;) = mysql_fetch_row(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$result&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;That should fix your previous question.&lt;/p&gt;
&lt;p&gt;Rob, I think the ordering concern is when you add a new record and want to stick it between two other entries.&lt;/p&gt;
&lt;p&gt;If this is the case, you simply add another field (lets say &quot;`sort` int(11) unsigned NULL default &#039;0&#039;&quot;).  Then sort on the `sort` field.  This, of course, adds a layer of complexity as you&#039;ll need to provide a method of updating the `sort` number for existing records.&lt;/p&gt;
&lt;p&gt;With the latest changes Rob made, your script should start breathing soon. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/wink.png&quot; title=&quot;Wink&quot; alt=&quot;Wink&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Wed, 04 Sep 2002 03:45:10 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1113531 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/how-do-i-update-mysql-table-php-submitted-form#comment-1113465</link>
    <description> &lt;p&gt;in answer to your question &quot;would i do this?&quot;...&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;echo \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;&amp;lt;li&amp;gt;&amp;lt;input type=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;checkbox&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; name=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$ch&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$task_id&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; value=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; alt=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;is it done&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$ifchecked&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$itemname&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&amp;lt;/li&amp;gt;\n\&quot;;&lt;br /&gt;&lt;br /&gt;// the answer is no, you already have this line so use it:&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$checkboxname&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$details&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;task_id\&quot;];&lt;br /&gt;&lt;br /&gt;/* you want the checkbox to be named as arrayname[key]&lt;br /&gt;an array is a list of values accessed by keys ... well actually it&#039;s called a hash, an array is an &lt;br /&gt;incremental list of values accessed by an index, but that&#039;s just the elitist in me so ignore it&lt;br /&gt;... anyways, arrayname can be anything you want to name it, name it dogfood if you want, but ill simply &lt;br /&gt;name it &#039;checklist&#039;.&amp;nbsp; key is the key the index will be accessed by, in this case we&#039;re using the task_id, &lt;br /&gt;so each checkbox will be named checklist[task_id]... */&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$checkboxname&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;checklist[&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$details&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;task_id&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]}&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;]\&quot;;&lt;br /&gt;// that&#039;s not as bad as it looks, &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$details&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;task_id&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]}&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; simply evaluates to an integer, ...&lt;br /&gt;// ie: the task id of the current task&lt;br /&gt;&lt;br /&gt;// now you can do exactly what you were doing&lt;br /&gt;echo \&quot;&amp;lt;li&amp;gt;&amp;lt;input type=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;checkbox&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; name=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$checkboxname&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; value=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; alt=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;is it done&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$ifchecked&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$itemname&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&amp;lt;/li&amp;gt;\n\&quot;;&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;as far as your concern about ordering by id, i&#039;m not sure i understand.  if you mean, by deleting records and effectively removing an element from the id order, that&#039;s not a concern.  1,6,3,9 will sort the same as 1,2,3,6,7,8,4,5,9.&lt;/p&gt;
 </description>
     <pubDate>Tue, 03 Sep 2002 04:11:22 +0000</pubDate>
 <dc:creator>ROB</dc:creator>
 <guid isPermaLink="false">comment 1113465 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/how-do-i-update-mysql-table-php-submitted-form#comment-1113459</link>
    <description> &lt;p&gt;Am I right in hearing that you&#039;re saying this is a horribly awkward way to do it? (And thank you, I think it&#039;s beginning to dawn on me how this works).&lt;/p&gt;
&lt;p&gt;So, in order to get the array as needed, what would the code look like? This is what I have:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;/* GET THE INFORMATION OUT OF THE DATABASE AND DISPLAY CATEGORIES AND LISTS OF ITEMS */&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$qResult &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;mysql_query&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;SELECT * FROM checklist_categories ORDER BY ID\&quot;);&lt;br /&gt;&lt;br /&gt;while(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$row&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = mysql_fetch_array(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$qResult&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;)) { // while this category&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$category&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$row&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;name\&quot;];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$cat_id&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$row&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;ID\&quot;];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$description&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$row&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;description\&quot;];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo \&quot;&amp;lt;h2&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$category&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&amp;lt;/h2&amp;gt;\n\n&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Category &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$cat_id&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;:&amp;lt;/strong&amp;gt; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$description&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&amp;lt;/p&amp;gt;\n\n&amp;lt;ul&amp;gt;\n\&quot;;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$qResult2&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = mysql_query(\&quot;SELECT * FROM moving WHERE category_id LIKE &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$cat_id&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; ORDER BY task_id\&quot;);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$details&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = mysql_fetch_array(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$qResult2&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;)) {&amp;nbsp;&amp;nbsp;&amp;nbsp; // display items for this category&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$itemname&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$details&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;name\&quot;];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$checkboxname&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$details&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;task_id\&quot;];&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$details&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;completed\&quot;] == 1) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$ifchecked&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;checked=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;checked&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; \&quot;; // put in the code including the space&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$ifchecked&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;\&quot;; // nothing is printed &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo \&quot;&amp;lt;li&amp;gt;&amp;lt;input type=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;checkbox&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; name=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$checkboxname&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; value=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; alt=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;is it done&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$ifchecked&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$itemname&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&amp;lt;/li&amp;gt;\n\&quot;;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; //end item loop&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo \&quot;&amp;lt;/ul&amp;gt;\n\n\&quot;;&lt;br /&gt;&lt;br /&gt;}&amp;nbsp; //end category loop&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Would I do this?&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;echo \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;&amp;lt;li&amp;gt;&amp;lt;input type=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;checkbox&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; name=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$ch&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$task_id&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; value=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; alt=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;is it done&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$ifchecked&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$itemname&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&amp;lt;/li&amp;gt;\n\&quot;;&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Now that I&#039;m this far into it, I can see how ordering by task id would be a problem if you, say, wanted to put items in and take items out. &lt;/p&gt;
&lt;p&gt;Perhaps I need to entirely rethink how to approach this. I&#039;m still having trouble with Mark&#039;s script, mostly because I have to learn how it works in order to edit it to fit, and I&#039;m trying to do this and pack and sell everything we&#039;re not moving, lol.&lt;/p&gt;
&lt;p&gt;I&#039;m thinking when I get to Ontario I&#039;m going to sign up for a course at UW and see how if that helps... &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/wink.png&quot; title=&quot;Wink&quot; alt=&quot;Wink&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Tue, 03 Sep 2002 02:51:41 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1113459 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/how-do-i-update-mysql-table-php-submitted-form#comment-1113446</link>
    <description> &lt;p&gt;ah, in that case you can do&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;INPUT TYPE=&amp;quot;checkbox&amp;quot; NAME=&amp;quot;checklist[1]&amp;quot; VALUE=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;INPUT TYPE=&amp;quot;checkbox&amp;quot; NAME=&amp;quot;checklist[2]&amp;quot; VALUE=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;INPUT TYPE=&amp;quot;checkbox&amp;quot; NAME=&amp;quot;checklist[3]&amp;quot; VALUE=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;// where x in checklist[x] is the task_id&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;then, you would get you&#039;re array of checked keys like:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;$checkedkeys &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;array_keys&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$checklist&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;// and the rest ...&lt;br /&gt;// uncheck all records&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;mysql_query&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;UPDATE moving SET completed=&#039;0&#039;\&quot;); &lt;br /&gt;&lt;br /&gt;// now re-check the ones that are checked&lt;br /&gt;foreach(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$checkedkeys&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; as &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$id&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mysql_query(\&quot;UPDATE moving SET completed=&#039;1&#039; WHERE task_id=&#039;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$id&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;\&quot;);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
 </description>
     <pubDate>Tue, 03 Sep 2002 00:33:08 +0000</pubDate>
 <dc:creator>ROB</dc:creator>
 <guid isPermaLink="false">comment 1113446 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/how-do-i-update-mysql-table-php-submitted-form#comment-1113445</link>
    <description> &lt;p&gt;would it be possible to only set the value to 1 since the checklist is printed in order and the task_id is the checklist name? In order to validate, the checklist has to have a unique name...&lt;/p&gt;
&lt;p&gt;?&lt;/p&gt;
 </description>
     <pubDate>Tue, 03 Sep 2002 00:07:52 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1113445 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/how-do-i-update-mysql-table-php-submitted-form#comment-1113440</link>
    <description> &lt;p&gt;ok what you were doing makes more sense now.  one thing i&#039;d definately change:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;//you define your checkboxes like this&lt;br /&gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;1&amp;quot; value=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;2&amp;quot; value=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;3&amp;quot; value=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;//you should define them like this&lt;br /&gt;&amp;lt;INPUT TYPE=&amp;quot;checkbox&amp;quot; NAME=&amp;quot;checklist[]&amp;quot; VALUE=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;INPUT TYPE=&amp;quot;checkbox&amp;quot; NAME=&amp;quot;checklist[]&amp;quot; VALUE=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;INPUT TYPE=&amp;quot;checkbox&amp;quot; NAME=&amp;quot;checklist[]&amp;quot; VALUE=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;// where value is the task_id&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;what this will do is cause your script to receive an array of checked id&#039;s rather than recieving seperate variables.&lt;/p&gt;
&lt;p&gt;you can test this with something like:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;foreach(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$checklist &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;as &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$id&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;) echo \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$id&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&amp;lt;BR&amp;gt;\&quot;;&lt;br /&gt;// which will print out a list of the id&#039;s of all the checked boxes&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;so now that you know all the id&#039;s which are checked, you know everything else is unchecked.  unfortunately, anything that is not checked is undefined and you only know it&#039;s not defined because of it&#039;s lack of existence, which means you need to be aware of it&#039;s existence beforehand. i really hate this because it makes it difficult to deal with large arrays of dynamic checkbox items, but there are workarounds.&lt;/p&gt;
&lt;p&gt;since we know what is checked, i&#039;d mark everything unchecked(in the database) and then check the ones we know are checked like so:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;// uncheck all records&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;mysql_query&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;UPDATE moving SET completed=&#039;0&#039;\&quot;); &lt;br /&gt;// now re-check the ones that are checked&lt;br /&gt;foreach(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$checklist&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; as &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$id&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mysql_query(\&quot;UPDATE moving SET completed=&#039;1&#039; WHERE task_id=&#039;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$id&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;\&quot;);&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;hope that helps&lt;/p&gt;
 </description>
     <pubDate>Mon, 02 Sep 2002 23:24:53 +0000</pubDate>
 <dc:creator>ROB</dc:creator>
 <guid isPermaLink="false">comment 1113440 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/how-do-i-update-mysql-table-php-submitted-form#comment-1113439</link>
    <description> &lt;p&gt;oh, sorry! I forgot about the password protection:&lt;/p&gt;
&lt;p&gt;username: moving&lt;br /&gt;
password: ackackack&lt;/p&gt;
&lt;p&gt;Sorry, it was late and my eyes were crossing. Maybe I do need to use implode after all.&lt;/p&gt;
 </description>
     <pubDate>Mon, 02 Sep 2002 21:44:40 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1113439 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
