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

Posted by Jerry Stuckle on 07/07/06 01:44

Geoff wrote:
> 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
>

Geoff,

Remember - the name attribute is just something for you to identify the
data when it's passed. It does not have to be an actual filename - it
could be "xyz" for that matter. But it HAS to be changed, because '.'
is not a valid character in a PHP variable.

Whatever you have here is the identifier in the $_POST or $_GET array,
i.e. $_POST['xyz'].

The value in the field is where you want "filename.txt", and that should
not be changed.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

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

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