PDA

View Full Version : screwed up php upload settings


deafboyzaudio
08-15-2009, 07:00 AM
ok ive been messin around with this php upload stuff for a few days now. i got the form made and such and got "digital file pro" by web assist when i finally gave up tryin to code the php to upload user files to my server.
Program works great at writing the script, but it wasnt hooked to my upload page correctly... long story short i messed with some settings and, i dont even know what but i have a feeling stuff is all screwed up now...
here is a link but no guarantees on what it will do when you check it as im messin with it right now (my local test info for THIS PAGE ONLY is screw up as well, the only way i can test is by uploading to web server)
basically the images wont upload to my server...... (user:user pass: password) www.deafboyzaudio.com/trueupload.php (http://www.deafboyzaudio.com/trueupload.php) here is my code for the form:
div id="mainContent">
<div id="leftDiv"></div>
<div id="uploadDiv">
<form id="form1" name="form1" method="post" action="HelperPHP.php">
<input name="Browse" type="file" size="50" maxlength="200" />
</form>
<form id="form2" name="form2" method="post" action="">
<input name="Browse" type="file" size="50" maxlength="200" />
</form>
<form id="form3" name="form3" method="post" action="">
<input name="Browse" type="file" size="50" maxlength="200" />
</form>
<form id="form4" name="form4" method="post" action="">
<input name="Browse" type="file" size="50" maxlength="200" />
</form>
<form id="form5" name="form5" method="post" action="">
<input name="Browse" type="file" size="50" maxlength="200" />
</form><form id="form6" name="form6" method="post" action="HelperPHP.php"><input name="Submit" type="submit" id="submit" value="Submit" /></form>
</div>
</div>


my script file helper.php is one big mofo so i wont post it up unless someone says they need it, ill be messin with this for a while so feel free to ask me now. thanks for your help, im tryin to start a business on a time schedule, you all prolly know how that is..... peace

edbr
08-15-2009, 08:02 AM
forms to upload files need tp be multi parf and you need a script to upload them . do you have a script?

bee80
08-15-2009, 10:12 AM
show us the script please, id like to see what else it adds other than whats needed

deafboyzaudio
08-15-2009, 11:41 AM
ok the only way i could get the full script up is by making it a page on my site. just go to the link and hit *view source* in the browser to see it in code format, sorry there is no line numbers, (someone lemme know if there is a way to do this) i got this script from web assist through a program called digital file pro.... the link is www.deafboyzaudio.com/scriptexample.htm (http://www.deafboyzaudio.com/scriptexample.htm)

deafboyzaudio
08-15-2009, 06:06 PM
i might add that i was experimenting with this all night and my host (1and1) mentioned that i need to have an action=????? in my form 1-5. i put one in the first form as thats where i selected the pic to be uploaded at, and one in the action for the submit button but that did not work either, How do i correctly link the script to the upload page?

deafboyzaudio
08-17-2009, 11:05 PM
ok got some help from another forum and was told to change a few things, this is what my upload form looks like now...
<div id="uploadDiv">
<form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
<input name="Browse" type="file" size="45" maxlength="200" />
<input name="Browse" type="file" size="45" maxlength="200" />
<input name="Browse" type="file" size="45" maxlength="200" />
<input name="Browse" type="file" id="Browse" size="45" maxlength="200" />
<input name="Browse" type="file" size="45" maxlength="200" />
<input name="Submit" type="submit" id="submit" value="Upload" /></form>
</div>well now i am getting an error message at the top of this page once upload is clicked and the page reloads "UploadNotice: Undefined variable: firstFile in C:\wamp\www\DBAtest\WA_DigitalFilePro\HelperPHP.ph p on line 334" helperphp.php is my script for my upload behavior... here is a few lines previous to 334 if($counter == 0){ // set first upload values into V1 status values
$_SESSION[$sessionName] = $defaultFileName;
foreach($WA_DFP_UploadStatus[$statusName][$key] as $subkey=>$subval){
$WA_DFP_UploadStatus[$statusName][$subkey] = $subval;
}
}
$counter++;
}
}here is the error line (334) + the rest in that string(-338 if (file_exists($firstFile)) {
unlink($firstFile);
}
return;
}
that almost makes me think that the file is already uploaded but it is not, i have been checkin my server. this is getting kinda frustrating and I would appreciate some input or ideas for a fix. thanks