| 
 Posted by Malcolm Dew-Jones on 12/09/05 21:49 
Justin Koivisto (justin@koivi.com) wrote: 
 
: Kim Andrι Akerψ wrote: 
: >  
: > You can safely use "_" (underscore) instead. If you need to use it in a 
: > query string or form field, use $_POST, $_GET or $_REQUEST. 
 
: - characters in those arrays are replaced by _ automagically... 
 
There must be a config setting to do that, cause I have never observed 
that behaviour.  The following uses - in the html parameter names. 
 
 
<?php 
 
echo "the-name = ["; 
echo $_REQUEST['the-name']; 
echo "]\n"; 
 
 
echo "hidden-name = ["; 
echo $_REQUEST['hidden-name']; 
echo "]\n"; 
 
?> 
 
<form> 
 
<input type="text" name="the-name" /> 
 
<input type="hidden" name="hidden-name" value="a hidden value" /> 
 
<input type=submit /> 
 
</form>
 
  
Navigation:
[Reply to this message] 
 |