Revision: 1917
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1917&view=rev
Author:   cimorrison
Date:     2011-09-01 07:35:12 +0000 (Thu, 01 Sep 2011)
Log Message:
-----------
Added comment

Modified Paths:
--------------
    mrbs/trunk/web/edit_entry_handler.php

Modified: mrbs/trunk/web/edit_entry_handler.php
===================================================================
--- mrbs/trunk/web/edit_entry_handler.php       2011-08-31 22:50:58 UTC (rev 
1916)
+++ mrbs/trunk/web/edit_entry_handler.php       2011-09-01 07:35:12 UTC (rev 
1917)
@@ -5,6 +5,19 @@
 require_once "mrbs_sql.inc";
 require_once "functions_ical.inc";
 
+// NOTE:  the code on this page assumes that array form variables are passed
+// as an array of values, rather than an array indexed by value.   This is
+// particularly important for checkbox arrays whicgh should be formed like 
this:
+//
+//    <input type="checkbox" name="foo[]" value="n">
+//    <input type="checkbox" name="foo[]" value="m">
+//
+// and not like this:
+//
+//    <input type="checkbox" name="foo[n]" value="1">
+//    <input type="checkbox" name="foo[m]" value="1">
+
+
 // Get non-standard form variables
 $formvars = array('create_by'         => 'string',
                   'name'              => 'string',
@@ -765,6 +778,7 @@
   {
     if ($var_type == 'array')
     {
+      // See the comment at the top of the page about array formats
       foreach ($$var as $value)
       {
         echo "<input type=\"hidden\" name=\"${var}[]\" value=\"" . 
htmlspecialchars($value) . "\">\n";

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to