Re: [PHP] POST/GET - if there is a dot in the name it's changes to "_"
From: "Arnau Rebassa" <[EMAIL PROTECTED]> > I'm having the same problem as the bug report > http://bugs.php.net/bug.php?id=7987. They say that's not a bug it's a > feature... Anybody knows where I can find which characters are changed and > by which character? Spaces are also converted to underscore characters. Leading spaces are trimmed. name=" foobar " => $_GET['foobar_'] name="foo bar" => $_GET['foo_bar'] ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] POST/GET - if there is a dot in the name it's changes to "_"
Arnau: On Tue, Aug 12, 2003 at 05:28:54PM +, Arnau Rebassa wrote: > I'm having the same problem as the bug report > http://bugs.php.net/bug.php?id=7987. They say that's not a bug it's a > feature... Anybody knows where I can find which characters are changed and > by which character? You're should use field names which conform to the varialbe naming conventions. If you do, you won't run into these conversion problems. Here's what the manual says are valid: "Variable names follow the same rules as other labels in PHP. A valid variable name starts with a letter or underscore, followed by any number of letters, numbers, or underscores... Note: For our purposes here, a letter is a-z, A-Z, and the ASCII characters from 127 through 255 (0x7f-0xff)." http://php.net/language.variables So, I guess to answer your question, it seems anything that's not in this list of valid characters will get turned into "_" But, let me state again: use valid names in the first place. Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NYv: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] POST/GET - if there is a dot in the name it's changes to "_"
On 12 August 2003 18:29, Arnau Rebassa wrote: > Hi all, > I'm having the same problem as the bug report > http://bugs.php.net/bug.php?id=7987. They say that's not a bug it's a > feature... Anybody knows where I can find which characters > are changed and > by which character? The bug you quoted doesn't seem to be at all relevant to the problem mentioned in your subject. However, assuming you're referring to names of form elements, then: Since the names given by form element name= attributes can potentailly be used as PHP variable names (if register_globals is on), only characters legal in PHP variable names can be guaranteed to work -- all others may cause unexpected side-effects. The . character is treated as a special exception and converted to _ since it occurs in names auto-generated by the browser, and outwith the user's control. Basically, you are best off sticking to a-z, 0-9 and _ in basic form element names -- if you use [] to send the value(s) to a PHP array, you can, of course, put anything legal as a PHP array key (which is pretty much anything!) between the brackets. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] POST/GET - if there is a dot in the name it's changes to "_"
Hi all, I'm having the same problem as the bug report http://bugs.php.net/bug.php?id=7987. They say that's not a bug it's a feature... Anybody knows where I can find which characters are changed and by which character? Thank you very much for your help -- Arnau _ ¿Estás buscando un auto nuevo? http://www.yupimsn.com/autos/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] POST/GET - if there is a dot in the name it's changes to "_"
Hi What version and OS are you on ? Pradeep www.naharonline.com - Original Message - From: "Arnau Rebassa" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 12, 2003 10:58 PM Subject: [PHP] POST/GET - if there is a dot in the name it's changes to "_" > Hi all, > I'm having the same problem as the bug report > http://bugs.php.net/bug.php?id=7987. They say that's not a bug it's a > feature... Anybody knows where I can find which characters are changed and > by which character? > > > Thank you very much for your help > > -- > Arnau > > _ > ¿Estás buscando un auto nuevo? http://www.yupimsn.com/autos/ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php