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
Share on other sites

:'(

 

Such a rookie mistake. I assumed the php was wrong and completely overlooked the html form itself.

 

It works absolutely fine now. I think I'll go sulk in the corner for a while now

 

Thanks :D

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.