NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Move File

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 10-19-2006, 03:56 PM THREAD STARTER               #1 (permalink)
Account Closed
Join Date: Oct 2005
Location: United Kingdom
Posts: 1,554
NetworkTown.Net is just really niceNetworkTown.Net is just really niceNetworkTown.Net is just really niceNetworkTown.Net is just really nice
 



Move File


HI

I need some help, im making a small mod for a script i use and i need the following, when i fill in a form in 2 of the feilds it is a drop down menu that list's all the files in the files directory and the other in the images directory.

So what i want is when i select the two files from each of the files e.g:

File: blabla.txt (would be located in content/uploaded/blabla.txt)
Img: blabla.gif (would be located in images/uploaded/blabla.gif)

I want is when i click submit the script will move the files to one directory down so then it will be located as this:
????: NamePros.com http://www.namepros.com/programming/248941-move-file.html

blabla.txt would then be located in content/blabla.txt
blabla.gif would then be located in images/blabla.gif

Please if you could help me i would be pleased.
NetworkTown.Net is offline  
Old 10-19-2006, 04:16 PM   #2 (permalink)
NamePros Regular
 
Noobie's Avatar
Join Date: Feb 2006
Location: Montreal, Quebec, Canada
Posts: 324
Noobie is on a distinguished road
 



you can http://ca3.php.net/rename if you want
__________________
Goldkey.com is a scam
What's your BMI? | Timestamp Generator
Noobie is offline  
Old 10-19-2006, 05:06 PM   #3 (permalink)
Dan
Buy my domains.
 
Dan's Avatar
Join Date: Feb 2006
Posts: 2,796
Dan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant future
 


Autism Autism Autism Autism Autism Autism Autism
www.php.net/rename
working link :X
Dan is offline  
Old 10-20-2006, 09:11 AM THREAD STARTER               #4 (permalink)
Account Closed
Join Date: Oct 2005
Location: United Kingdom
Posts: 1,554
NetworkTown.Net is just really niceNetworkTown.Net is just really niceNetworkTown.Net is just really niceNetworkTown.Net is just really nice
 



Originally Posted by Dan
www.php.net/rename
working link :X
I found that but i need to know how do i get the info from th form to work with that?
NetworkTown.Net is offline  
Old 10-20-2006, 04:43 PM   #5 (permalink)
Dan
Buy my domains.
 
Dan's Avatar
Join Date: Feb 2006
Posts: 2,796
Dan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant future
 


Autism Autism Autism Autism Autism Autism Autism
(Without seeing your form:) Most likely it would be something like:
Code:
<input name="oldname" type="text"> and <input name="newname" type="text">
If that's how it is, you'd use
PHP Code:
<?php rename($_POST['oldname'], $_POST['newname']); ?>
Dan is offline  
Old 10-21-2006, 03:35 AM THREAD STARTER               #6 (permalink)
Account Closed
Join Date: Oct 2005
Location: United Kingdom
Posts: 1,554
NetworkTown.Net is just really niceNetworkTown.Net is just really niceNetworkTown.Net is just really niceNetworkTown.Net is just really nice
 



So it would look like this:
PHP Code:
  <?php

rename
($_POST['image'], $_POST['file']);

rename("/images/upload/$_POST['image']""images/$_POST['image']);
????: NamePros.com http://www.namepros.com/showthread.php?t=248941

 ?>
Something like that?
NetworkTown.Net is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 06:06 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger