Hi there,
I recently discovered I could get into the $HTTP_POST_VARS values and change them directly after a form was submitted. Sometimes this is very good.
However, I am having difficulty changing form values with indexes, the best way I can show this is by a SHORT example:
<form name="form1" method="post" action="">
<input type="text" name="myVar">
<input type="text" name="arrayVar[1][1]">
<input type="submit">
</form>
<?php
echo "Value of myVar is " .$HTTP_POST_VARS['myVar'] .'<br>';
echo "Value of arrayVar is " .$HTTP_POST_VARS['arrayVar[1][1]'] .'<br>';
//(myVar shows, arrayVar doesn't)
echo 'Now we change the values...<br>';
$HTTP_POST_VARS['myVar']='new';
$HTTP_POST_VARS['arrayVar[1][1]']='new';
// now see what happens:
echo "Value of myVar is " .$HTTP_POST_VARS['myVar'] .'<br>';
echo "Value of arrayVar is " .$HTTP_POST_VARS['arrayVar[1][1]'] .'<br>';
//(both are changed, but I think that the new array value is not going to the POST_VARS directly)
?>
Any insight on this problem?
Thanks,
Sam Fullman