Hi guys,
I've followed a tutorial for uploading a file, and it works, however, how could I go about returning the URL. ie. When the file is uploaded, it will return the URL to the file?
My code is;
<?php
$uploadDir = '/mywebsite/uploads/';
$uploadFile = $uploadDir . $_FILES['userfile']['name'];
print "<pre>";
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadFile))
{
print "File is valid, and was successfully uploaded. ";
print "Here's some more debugging info:\n";
print_r($_FILES);
}
else
{
print "Possible file upload attack! Here's some debugging info:\n";
print_r($_FILES);
}
print "</pre>";
?>
Thanks
Daryl Reilly