You are here: Re: method="POST" changes '.' to '_' « PHP Programming Language « IT news, forums, messages
Re: method="POST" changes '.' to '_'

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?
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация