Jump to content

[SOLVED] Uploading a file


Box

Recommended Posts

This should be very very simple and its been driving me crazy since Thursday night. The directory is chmodded to 777 so its not that ;)

 

 

my form is:

<table>
<tr>
	<form action="managemusic.php" method="post">
	<td>Track Name/Comp: </td><td><input type="text" name="name"/></td></tr>
	<td>Artist/Squad: </td><td><input type="text" name="artist" /></td></tr>
	<td>Filename: </td><td><input type="file" name="uploadedfile" /> </td></tr>

<tr><td colspan="3" align="center"><input type="submit" value="Add Song"/></td?</tr>
</form>
</table>

 

and my code to upload the file from this form is:

 

move_uploaded_file ($_FILES['uploadedfile'] ['tmp_name'], "../player/$_FILES['uploadedile'] ['name']");

 

I cannot for the life of me get the file to upload or even be acknowledged.

I've tried echoing the variables out and they show nothing.

 

Am I at a lost cause and have spent so many hours googling and playing with the code, this is the 3rd version and the most basic (less code there is, the less to go wrong with it, ill add in the error checking again once I get the main part working!

 

some please put me out of my misery :(

 

 

Link to comment
https://forums.phpfreaks.com/topic/165716-solved-uploading-a-file/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.