rendered paste bodyThe HTML form that populates $_POST:
<form method="POST" action="/demos/coderauction/dbtest.php"><br>
<input name=User['Username'] type="text" maxlength=20 value=Test User>
<input type="hidden" name=User['UserID'] value=1><br>
<input type="submit" name="update" value="update"></form>
print_r($_POST) looks like:
Array
(
[User] => Array
(
[\'Username\'] => Test
[\'UserID\'] => 1
)
[update] => update
)
print_r($User) looks like:
Array
(
[\'Username\'] => Test
[\'UserID\'] => 1
)
From inside a function: called with $obj->myfunc($User)
function myfunc($user)
foreach($user as $key=>$value) {
print "$key=>$value<br>";
}
}
produces:
\'Username\'=>Test
\'UserID\'=>1