Welcome Guest, Not a member yet? Register   Sign In
Form validation callback parameter
#4

[eluser]Nick Roper[/eluser]
If you use array notation for form input names then an equivalent array will be created in $_POST. So, the first input named field[] can be referenced as $_POST['fiield'][0] and the next as $_POST['field'][1] etc. You can also specify keys explicitly in the input name - for example:

name="field[2]"

can then be referenced as $_POST[2]

If you want to use associative keys then don't enclose the key name in quotes in the <input> HTML, otherwise the quotes become part of the key name:

name="field[option1]"

can be referenced as $_POST['option1']


Messages In This Thread
Form validation callback parameter - by El Forum - 09-24-2010, 01:15 AM
Form validation callback parameter - by El Forum - 09-24-2010, 11:33 AM
Form validation callback parameter - by El Forum - 11-14-2010, 12:52 AM
Form validation callback parameter - by El Forum - 11-14-2010, 02:10 AM



Theme © iAndrew 2016 - Forum software by © MyBB