Posted by Geoff on 07/07/06 01:07
On 6 Jul 2006 16:03:14 -0700, flamer die.spam@hotmail.com wrote...
>
>umm why dont you just (on the test.php page) do a str replace and
>change the '_' back to a '.' ??
>
>flamer.
Thought about that too, but could have a problem with
<input type="submit" name="file_name.txt">
becoming "file.name.txt", if other form fields are using that logic.
Saw someone else (Andy?) mention the "name" being the problem and not the value.
Instead of messing around with the ".txt", name it "filename" and append a
".txt" later if it's that crucial to the program.
Geoff
--
Newsguy Unlimited $19.95 monthly
http://newsguy.com/overview.htm
>
>Robert S wrote:
>
>> I am trying to use POST to transfer data to another page. When I do
>> this, '.' characters get converted to"_". For example:
>>
>> #index.html:
>> <form action="test.php" method="post">
>> <input type="submit" name="filename.txt">
>> </form>
>>
>> #test.php
>> <html>
>> <?php
>> var_dump( $_POST );
>> ?>
>> </html>
>>
>> This displays:
>>
>> array(1) { ["filename_txt"]=> string(12) "Submit Query" }
>>
>> ie 'filename.txt' is changed to 'filename_txt'
>> How can I stop this behaviour?
>
[Back to original message]
|