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!
It will show the file being transfered. And it will go all the way through without any errors. But when i go to my ftp and look in the upload directory nothing is there. CHMOD is 777 btw. Heres the code.
form.php
<?
if(!eregi("modules.php", $_SERVERї'PHP_SELF'])){
die("You can't access this file directly...");
}
$module_name = basename(dirname(__FILE__));
$module_dir = "modules/$module_name/";
include("header.php");
$index = 1;//right sidebar or not 0=off 1=on
title("Submit Band info/Mp3's");
OpenTable();
?>
<br>You may upload TWO mp3s that are no more than 3.5mb each. If one mp3 is more than
3.5mb. You may only upload ONE. If you do not abide by this rule all information will be Discarded.
<br>
<FORM ACTION="http://naild.com/localmm/modules?=Bands_Showcase&file=upload" METHOD="POST" ENCTYPE="multipart/form-data">
Browse to files:<BR>
<INPUT TYPE="FILE" NAME="firstfile" SIZE="50"><BR>
<INPUT TYPE="FILE" NAME="secondfile" SIZE="50"><BR>
<INPUT TYPE="SUBMIT">
</FORM>
<?php
CloseTable();
include("footer.php");
?>
im not trying to get people to write scripts for me but this is just one of those times where i need that kind of visual aid. :/ Ive been here all day trying to figure this out.
Well, there's one of 2 things going wrong, either the upload part just plain isn't working or the rest of the code is getting in the way..all that module stuff etc..
So i'd remove the extra code complication. Copy the example code from http://www.php.net/manual/en/features.f ... ltiple.php and run it as a totally separate file, i.e outside of your code (tweak the example to match your setup). If that works then the problem lies not in the actual uploading but in the 'surrounding code'.