You are here: How to work around FORM method="post" changing "." to "_" please? « PHP Programming Language « IT news, forums, messages
How to work around FORM method="post" changing "." to "_" please?

Posted by william.hooper on 10/14/07 13:55

here is my form:

<html>
<head></head>
<body>

<FORM ACTION="code.php" method="post">
<INPUT TYPE=SUBMIT NAME="arty.jpg" VALUE="Action">
</FORM>

</body>
</html>

here is code.php:

<?php
if(!empty($_POST)){
foreach($_POST as $myFile => $value){
echo "$myFile";
}
}
?>

What I was expecting is that the code would print out "arty.jpg" when
you click the button.

Instead it prints out "arty_jpg"

So the Post method is changing "." to "_"

But I need to pass the filename which may include both "_" and "."
character.

I guess I need some kind of escape and unescape funtion.

Please can someone reccomend one.

PS I am working on a file upload / downalod / delete form at this
link:

http://willyhoops.com/upload/

Many Thanks...

 

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

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