hi...
alvarogtc..
if u have problem in uploading files means just try the following code.....
use 2 files....
1.one for selecting the file to upload (UPLOAD1.PHP)
2.code to upload the file... (UPLOAD.PHP)
[U]UPLOAD1.PHP[/U]
html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<form action="upload.php" enctype="multipart/form-data" name="f1" method="post">
<input type="file" name="file1" value="" /><br>
<input type="submit" name="submit" value="upload" />
</form>
</body>
</html>
UPLOAD.PHP
<?php
if ($FILES["file1"]["error"] > 0)
{
echo "Error: " . $FILES["file1"]["error"] . "<br />";
}
else
{
echo "Upload: " . $FILES["file1"]["name"] . "<br />";
echo "Type: " . $FILES["file1"]["type"] . "<br />";
echo "Size: " . ($FILES["file1"]["size"] / 1024) . " Kb<br />";
// echo "Stored in: " . $FILES["file"]["tmp_name"];
}
if (file_exists("h:/qvoice/" . $FILES["file1"]["name"]))// it is used to check the same file is exist
{
echo $FILES["file1"]["name"] . " already exists. ";
}
else
{
move_uploaded_file($FILES["file1"]["tmp_name"],
"h:/qvoice/" . $FILES["file1"]["name"]); // here the distination folder path & it may anything
echo "Stored in: " . "h:/qvoice/" . $_FILES["file1"]["name"]; // it is for our reference
}
?>
CHANGE THE DISTINATION FOLDER NAME WHERE U WANT...
TRY IT.... IT WORKS TO ME....
IF U WANT TO FIND THE FILE IS WHICH TYPE
Firt u read the file name and using strpos funtion find the positon of where(.) comes...
after that using condition check wheather it is mp3 or what file extension u want...