RE: [PHP] dynamic variable names?
RTFM... Read the Fabulous Manual. :) ha ha... It's possible, and downright easy. http://www.php.net/manual/en/language.variables.variable.php -Original Message- From: Matthew Delmarter [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 31, 2001 10:58 PM To: PHP Mailing List Subject: [PHP] dynamic variable names? Is it possible to dynamically assign a variable name? For example: variable name is $var_.name or $var_.$name Regards, Matthew Delmarter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] dynamic variable names?
I don't know if this is what you want, but take a look at http://www.php.net/manual/en/language.variables.php - You may want to assign them by reference? Matt Kaufman - Original Message - From: Matthew Delmarter [EMAIL PROTECTED] To: PHP Mailing List [EMAIL PROTECTED] Sent: Tuesday, July 31, 2001 7:58 PM Subject: [PHP] dynamic variable names? Is it possible to dynamically assign a variable name? For example: variable name is $var_.name or $var_.$name Regards, Matthew Delmarter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] dynamic variable names?
Nevermind, I forgot about variable variables. Matt Kaufman - Original Message - From: Matt Kaufman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 31, 2001 10:43 PM Subject: Re: [PHP] dynamic variable names? I don't know if this is what you want, but take a look at http://www.php.net/manual/en/language.variables.php - You may want to assign them by reference? Matt Kaufman - Original Message - From: Matthew Delmarter [EMAIL PROTECTED] To: PHP Mailing List [EMAIL PROTECTED] Sent: Tuesday, July 31, 2001 7:58 PM Subject: [PHP] dynamic variable names? Is it possible to dynamically assign a variable name? For example: variable name is $var_.name or $var_.$name Regards, Matthew Delmarter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Dynamic variable names
Casey, You need to loop around on the next page to find the variables - they are all in HTTP_POST_VARS:- while (list($key, $val) = each($HTTP_POST_VARS)) { print Key = .$key. Value = .$val.br; } Chris [EMAIL PROTECTED] wrote: Hi, I'm trying to access variables coming in through a form. I have assigned them dynamic names on the form page (e.g., $username, where username can change). Now how can I access these variables on the next page? I tried: $($people[username]) where username is a field and people is a MySQL record. This doesn't work though. Is this not possible? I'm essentially trying to make a page where someone can edit permissions for any number of users, and input value=$username. How else can I do this?? Thanks tons! -Casey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Chris Fry Quillsoft Pty Ltd Specialists in Secure Internet Services and E-Commerce Solutions 10 Gray Street Kogarah NSW 2217 Australia Phone: +61 2 9553 1691 Fax: +61 2 9553 1692 Mobile: 0419 414 323 eMail: [EMAIL PROTECTED] http://www.quillsoft.com.au You can download our Public CA Certificate from:- https://ca.secureanywhere.com/htdocs/cacert.crt ** This information contains confidential information intended only for the use of the authorised recipient. If you are not an authorised recipient of this e-mail, please contact Quillsoft Pty Ltd by return e-mail. In this case, you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. This e-mail and any attachments may also contain copyright material belonging to Quillsoft Pty Ltd. The views expressed in this e-mail or attachments are the views of the author and not the views of Quillsoft Pty Ltd. You should only deal with the material contained in this e-mail if you are authorised to do so. This notice should not be removed. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]