Reply to Re: MP3 upload problem

Your name:

Reply:


Posted by ZeldorBlat on 09/08/06 13:45

mpar612 wrote:
> Thanks! The name of the <input> element is "song1." I see right where
> that mistake was and I changed it the revised code is listed below. I
> tested this and I still get the same errors.
>
> Any other thoughts? Thanks!
>
> Code:
> $filetypes = array ('image/gif', 'image/jpg', 'image/jpeg');
> if (in_array($_FILES['song1']['type'], $filetypes)){
> $audio_name = $_FILES['song1']['name'];
> $audio_uploaddir = "../Lounge/audio/$audio_dir_new/";
> if (move_uploaded_file($_FILES['song1']['tmp_name'],
> $audio_uploaddir.'/'.$audio_name)) {
> print("file upload was successful");
> } else {
> print("file upload failed");
> }
> } else {
> print "Please use an mpeg";
> }

Well, the code you have basically says the following:

If the uploaded file isn't a GIF or JPEG tell the user to use an MPEG.

See the problem now?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация