note 4411 deleted from language.variables.external by philip

From: Date: Mon, 01 Apr 2002 05:30:46 +0000
Subject: note 4411 deleted from language.variables.external by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-28446@lists.php.net to get a copy of this message
You can also access a form element named $required-email in PHP with ${'required-email'}. I found this out while working with someone's form where all the element names had spaces in them! In addition to translating .'s in variable names to _'s, spaces are also translated to _'s. Granted, I don't believe spaces are technically legal in element names, but it works on every browser I've seen. So for <INPUT ... NAME=""This is a really bad name. It includes these characters: !@#$%^&*()"> you can access it using ${'This_is_a_really_bad_name___It_includes_these_characters:_!@#$%^&*()'} or $HTTP_POST(or GET)_VARS['This_is_a_really_bad_name___It_includes_these_characters:_!@#$%^&*()']

« previous php.notes (#28446) next »