Can't figure out behaviour...

For Joomla! 1.5 Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general
Locked
hjortsberg
Joomla! Explorer
Joomla! Explorer
Posts: 359
Joined: Sun Jun 22, 2008 4:25 pm

Can't figure out behaviour...

Post by hjortsberg » Wed Feb 23, 2011 5:12 pm

I am trying to save several lines to session table by

Code: Select all

$a = $_REQUEST['id'];
			$b = $_REQUEST['thing'];
			$c = array_combine($a, $b);
		
			foreach ($c as $id => $thing):
				$mainframe->setUserState( "my_component".$id, $thing );
			endforeach;
I know there is 5 id's and 5 things in my form but only 2 or three of them is stored in session table, any idea?

hjortsberg
Joomla! Explorer
Joomla! Explorer
Posts: 359
Joined: Sun Jun 22, 2008 4:25 pm

Re: Can't figure out behaviour...

Post by hjortsberg » Wed Feb 23, 2011 5:47 pm

I have figured out that only two pairs of id and thing is sent, have no idea why...??

I have used the same script on another page and that page has had at least 200 pairs and did work...

Someone?

hjortsberg
Joomla! Explorer
Joomla! Explorer
Posts: 359
Joined: Sun Jun 22, 2008 4:25 pm

Re: Can't figure out behaviour...

Post by hjortsberg » Wed Feb 23, 2011 5:57 pm

I am a stupid, stupid, very stupid man....

I did put the <form... inside a for statement...

:-[


Locked

Return to “Joomla! 1.5 Coding”