the problem is there is no error message... i'll send you my code though, k?
<FORM ENCTYPE="multipart/form-data" ACTION="" METHOD="POST">
<p>New Music Title:<br>
<input type="text" name="title" class="formtex" id="title">
</p>
<p><span class="formtex">Upload New Music:<br>
</span>
<input name="userfile1" type="file" class="formtex" id="userfile1">
</p>
<p><hr size=1>
<input name="submit" type="submit" class="formtex" value="Upload">
<br>
<?php
$path = "../images/music/";
$path2 = "images/music/";
$max_size = 20000000;
/*if (is_uploaded_file($userfile1)) {
if ($userfile1_size>$max_size) { echo "The file is too big<br>\n"; exit; }
if (($userfile1_type=="mp3") || ($userfile1_type=="mp3")) {
if (file_exists($path . $userfile1_name)) { echo "The file already exists<br>\n"; exit; }
$res = copy($userfile1, $path . $userfile1_name);
if (!$res) {
echo "upload failed!<br>\n"; exit; }
else
echo "1. $userfile1_name upload sucessful<br>\n";
} else { echo "Wrong file type<br>\n"; exit; }
}*/
?>
<?PHP
if ($REQUEST_METHOD=="POST") {
require('config.inc');
$cid = mysql_connect($host,$usr,$passwd);
// setup SQL statement
$date=date( "l, M d" );
$date2=date( "h:i a");
$title = addslashes($title);
$SQL = " INSERT INTO x_music ";
$SQL = $SQL . "(date, date2, dir, title, imagename) VALUES ";
$SQL = $SQL . " ('$date', '$date2', '$path2', '$title', '$userfile1_name')";
#execute SQL statement
$result = mysql_db_query($db,"$SQL",$cid);
// check for error
if (!$result) {
echo("ERROR: " . mysql_error() . "\n$SQL\n");
}else{
}
mysql_close($cid);
print ("<font color='#990000'><b>New Music File Added!</b></font>");
}else{}
?>
</FORM>
The part that is commented out, was the script I used for uploading images... and it would just tell me, wrong file type... so i commented it out...