Re: srtoring user selection on the database...

From: Date: Thu, 18 Jan 2001 22:53:14 +0000
Subject: Re: srtoring user selection on the database...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-35487@lists.php.net to get a copy of this message
> while(list($key, $val) = each($cb)) { > if ($val == 1 && $key != 0) { > $acc = $key; > } else { > $acc = $acc.",".$key; > } This looks syntactically correct. > } > // by the way this: $acc=.$key would be a valid command? like the c++ $a =+ > $b I usually use (for a string): .= that would be: $foo .= "old foo plus more stuff"; is the same as $foo = $foo . "old foo plus more stuff"; in PHP you use += for mathimatics. > > in this solution I store all the indexes that have a value 1 or that are > setted.. so let's say tha the user had click in 2,4,8,25 I would have > $acc=2,4,8,25... later on I explode that and I will have the clicks... > > What do you think? well, now you have the values. You need to state them. Either print them to "hidden" HTML input tags or save and retrieve them from the DB. :) Jeremy Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: jeremy@nirvani.net http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "LINUX is obsolete" -- Andy Tanenbaum, January 29th, 1992 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - http://www.JEEP-FOR-SALE.com/ -- I need a buyer Get your own Free, Private email at http://www.smackdown.com/

« previous php.general (#35487) next »