Page 1 of 1

changing the value of a browse file

Posted: Mon Oct 11, 2004 10:00 am
by pelegk2
i have this code :

Code: Select all

<?php
<form name="upload" id="upload" ENCTYPE="multipart/form-data" method="post" class='big_text'>
  &#1511;&#1493;&#1489;&#1509; &#1500;&#1496;&#1506;&#1497;&#1504;&#1492; <input type="file" id="userfile" name="userfile">
  <input type="submit" name="upload" value="&#1496;&#1506;&#1503;">
</form>

?>
this code is for ploading a file!
how can i change the name on the browse file to a name that i want?
thnaks in advance
peleg

Posted: Mon Oct 11, 2004 10:50 am
by djot
-
Hi,

The file first is uploaded to the server. There it is saved in a temporary file before moving it to the destination folder. While moving the file, you can choose a new filename.

If this was not the question and you mean the text on the browse button, you can't change that, this comes from the browser itself.


djot
-

Posted: Mon Oct 11, 2004 10:57 am
by phpScott
[php_man]move_uploaded_file[/php_man] is the php function that you are looking for.

Posted: Mon Oct 11, 2004 1:09 pm
by mudkicker
or at last in folder directory you can use [php_man]rename[/php_man]()

the point was with the browse button :)

Posted: Tue Oct 12, 2004 4:35 am
by pelegk2
thnaks all of u any way:)