I will give 150 points to whoever can help me. I know it's not much but it's the most i can send. Anyways
after looking to for a simple file upload script, which would HAD to simply echo the location of the uploaded file.
I have very no knowlage of PHP, but i have no choice but to give it a go myself since i really can't find one.
I've got the PHP script to upload the file, although i can't get it to echo the file location
here is my code
| Code: |
| <?php $location = "http://clan-adrenaline.com"; // Location of upload.php $target = "upload/";// Location files will be uploaded too $target = $target . basename( $_FILES['uploaded']['name']) ; $ok=1; if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) { echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded"; echo "This is the link to your song, this link should work in your profile ". echo "$location $target . basename( $_FILES['uploadedfile']['name']). "; } else { echo "Sorry, there was a problem uploading your file."; } ?> |
This is the error i get
| Code: |
[04-Aug-2008 08:29:24] PHP Parse error: syntax error, unexpected T_ECHO in /home/davhan/public_html/upload.php on line 10 |