Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- array inverting itself
October 23, 2007, 8:57 pm
rate this thread
form. In this form I create an array of all the displayed values. The
user can select one of them.
Note that only some of the possible names are displayed on the form.
I then want to check that the name the user selects is in the array.
I want to refer to the array on the page the "post" form is pointing
to. So I put the array in a session
$_SESSION['arr_motakt'] = $arr_motakt;
I test here with
Which prints my values correctly.
At the top of the page the "post" form points to I have this row again
after starting the session
But now it prints an inverted selection of the names, ie the ones that
were not displayed on the form.
My original list
Names displayed on form and shoved into array.
The user can choose 1 or 5 or 7.
When I test the array it prints correctly
The form is posted to the next page.
I test the array on line 2 after starting session and now it says.
There is no further code between the form page and the page I post to.
How have I managed to invert the array?
- » Using PHP to create folders on web space and upload files?
- — Previous thread in » PHP Scripting Forum