<?php
$output_dir = "uploads/";
if(isset($_FILES["myfile"]))
{
//Filter the file types , if you want.
if ($_FILES["myfile"]["error"] > 0)
{
echo "Error: " . $_FILES["file"]["error"] . "<br>";
}
else
{
//move the uploaded file to uploads folder;
move_uploaded_file($_FILES["myfile"]["tmp_name"],$output_dir. $_FILES["myfile"]["name"]);
echo "Uploaded File :".$_FILES["myfile"]["name"];
}
}
?>
This is my upload code, I can not get it to give the link after finishing the upload, I tried the code below and I could not get the link ... I'm still learning php so I'd like to know what it is Wrong exactly ...
echo "<a src='$_SERVER["DOCUMENT_ROOT"];".$_FILES["myfile"]["name"].>" Link "<a />";