changing the value of a browse file

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

changing the value of a browse file

Post 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
djot
Forum Contributor
Posts: 313
Joined: Wed Jan 14, 2004 10:21 am
Location: planet earth
Contact:

Post 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
-
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

Post by phpScott »

[php_man]move_uploaded_file[/php_man] is the php function that you are looking for.
User avatar
mudkicker
Forum Contributor
Posts: 479
Joined: Wed Jul 09, 2003 6:11 pm
Location: Istanbul, TR
Contact:

Post by mudkicker »

or at last in folder directory you can use [php_man]rename[/php_man]()
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

the point was with the browse button :)

Post by pelegk2 »

thnaks all of u any way:)
Post Reply