I'm sure you'll have seen 1,000s of questions on how to upload a file to a server. I hate to have to do this, but then again I don't.
I really need some help on how to get an upload file into a specify directory on the server (Linux). Below is the complete code for my upload system (atm). It would be very much apprecaite if, someone would help me one on one and explain to me how come it's not working and how to get it working.
<?
if(!session_is_registered('userna')) {
echo "This service is only provided to TSK Members. To become a TSK member register <a href=register.php>here</a>";
} else {
$supload = $Array[upload];
if(($supload == '') && ($type == 'sk')) {
echo "<form enctype=\"multipart/form-data\" action=\"upload.php\" method=\"post\">
<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"3145728\">
<P>Skin Name*:
<input type=\"text\" name=\"Array[sname]\">
<P>Skin File*:
<input name=\"Array[sfile]\" type=\"File\">
<br>Skin SS*:
<input name=\"Array[ss]\" type=\"File\"> - <b>JPG</b> Format Only!
<br>Skin SS2:
<input type=\"File\" name=\"Array[ss1]\"> - <b>JPG</b> Format Only!
<P>Skin Description*:
<br><textarea rows=\"7\" name=\"Array[desc1]\" cols=\"30\" value=\"This skin is perfect for going downtown...\"></textarea></p>
<input type=\"submit\" value=\"Upload Skin\" name=\"Array[supload]\">";
}
if($Array[supload] == TRUE) {
$sfile = $Array[sfile];
$sname = $Array[sname];
move_uploaded_file($_FILES['$sfile']['tmp_name'], /site/TS_File/sk/file/". $_FILES['$sfile']['$sname']);
echo "Your Skin File has been uploaded!";
}
}
?>
Thanks,
William M Gary