The name of my HTML checkbox form field is something like this:
name = "Some File name.pdf"
The PHP POST array looks something like this (some characters replaced by underscore):
array(
"Some_File_name_pdf" => "on"
)
Is there a PHP function I can use to convert a filename string exactly as it appears in the POST array? I am not interested in str_replace. I want to be able to do this:
$myfilename = $obj->getFileName(); // returns "Some File name.pdf"
$result = isset($_POST[some_encoding_function($myfilename)]);
The some_encoding_function should take a string like "Some File name.pdf" and return something like "Some_File_name_pdf";
nameattributes is probably a bad idea anyway.Some_File_name_pdfyourself using your own method).