Re: Variable name as a string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ioannes wrote:
Could someone tell me how to get the name of a variable as a string. This would be useful in form submission with multiple check-boxes to match against database records. At the moment I use ${"var".$ID[$x]} or someting like that to go through all the possible matches, but it would be quicker to explode the name of a checkbox like a string like cb_1 to match to record 1 etc.

There is some reason I do not use the value of the check box, but I can't remember it now!

John



For database use I do the following in forms:

	name="data[field_name]"

Or for multiple table that you update together:

	name="data[table_name][field_name]"

-Shawn

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux