*****Dynamic PHP w/ Upload*****
Posted: Fri Mar 27, 2009 4:24 pm
I need to use PHP to create a link on the page. I want to use the upload code (below) to create a link to a page where the file can be deleted, or so on.
Upload code:
You can see that I tried to do this (in red). This works, but I want the link to create a PHP page and not just use this link. The link would work, but I need to create a page that inputs the uploaded file name, and creates a page with a delete button or something. I don't know if you can use the Get function, or what, but this is important. PLEASE HELP!!!
If you don't understand what I want, PM me!
Upload code:
Code: Select all
<?php
$target = "public/";
$target = $target . basename( $_FILES['uploaded']['name']) ;
$ok=1;
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
{
echo "The file has been uploaded <a href='http://www.filefetchers.co.cc/[color=#FF0000]$target[/color]'>here</a>.";
}
else {
echo "Sorry, there was a problem uploading your file.";
}
?>You can see that I tried to do this (in red). This works, but I want the link to create a PHP page and not just use this link. The link would work, but I need to create a page that inputs the uploaded file name, and creates a page with a delete button or something. I don't know if you can use the Get function, or what, but this is important. PLEASE HELP!!!
If you don't understand what I want, PM me!