Hi, not very good at this code at all. Managed to get an upload form working but have now done something to ruin it when adding some text. Any help would be great
Parse error: syntax error, unexpected T_VARIABLE in /home/thehats1/public_html/upload.php on line 1
<?php/************************************************* * Uploader * * This was coded by
james addison and is aloud to be used by anyone who leaves the copyright there *
****************************************************///Windows way$uploadLocation =
"./";//Unix, Linux way//$uploadLocation = "\tmp";?><!DOCTYPE html PUBLIC "-//W3C//DTD
XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"><html><head> <title>THAF
Uploader</title> <link href="style/style.css" rel="stylesheet" type="text/css" />
<style type="text/css"><!--.style1 { font-size: 10px; }-->
</style></head><body> <div id="main"> <div id="caption">UPLOAD FILE</div>
<div id="icon"> </div> <form action="<?php echo $_SERVER['PHP_SELF']; ?>"
method="post" name="fileForm" id="fileForm" enctype="multipart/form-data"> File to
upload:<center> <table> <tr><td><input name="upfile" type="file"
size="36"></td></tr> <tr><td align="center"><p><br/> <input
class="text" type="submit" name="submitBtn" value="Upload"> </p> <p
align="right" class="style1"><a href="http://hosting-town.com">Made By Hosting-Town.com -
James Addison </a></p></td> </tr> </table></center> </form><?php
if (isset($_POST['submitBtn'])){?> <div id="caption">RESULT</div> <div
id="icon2"> </div> <div id="result"> <table width="100%"><?
php$target_path = $_SERVER['DOCUMENT_ROOT'] . '/upload/' . basename( $_FILES['upfile']
['name']);if(move_uploaded_file($_FILES['upfile']['tmp_name'], $target_path)) { echo
"The file". basename( $_FILES['upfile']['name']). "has been sucessfully uploaded.";}
else{ echo "There was an error uploading the file, please try again!";}?>
</table> </div><?php }?> <div>
<br><br>
<b>Please ensure you leave contact information in your id tags<br><br></b>
<br>You file will be stored at the location:-<br>www.thehatsandfriends.com/upload/(your
filename)<br>eg...www.thehatsandfriends.com/upload/mysong.mp3<br><br> <b>Please note: By
uploadng you are giving permission for any files to be featured on the main part of the
site<br><br>Please do not upload any illegal files. Any files found to be illegal will be
removed</b></body>