ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  PHP Form Handling
Subject:   Real World Example of Same
Date:   2006-01-19 19:23:30
From:   zinc_chameleon
Wouldn't you know it, my employer wanted select forms day one. There's two very important things to add to this example:
First:


<SELECT name="myselection[]" multiple>


has to be written EXACTLY as shown; HTML can handle a lot of variations on the syntax, but PHP5 can't. Second: Whatever script you pass this variable two, it has to be intialized to 0.


$ms = $_POST[myselection][0];