I am having trouble uploading a file based on the image directory I need to upload it with ...
here is the original code :
<?php
// Edit upload location here
$destination_path = getcwd().DIRECTORY_SEPARATOR;
$result = 0;
$target_path = $destination_path . basename( $_FILES['myfile']['name']);
if(@move_uploaded_file($_FILES['myfile']['tmp_name'], $target_path)) {
$result = 1;
}
sleep(1);
?>
<script language="javascript" type="text/javascript">window.top.window.stopUpload(<?php echo $result; ?>);</script>
the scripts works like this .. but it uploads it in the directory that this script is in which is here :
/public_html/scripts/upload.php
i need the images to be moved to this path :
/public_html/images/trainerpics/
but I can figure out how to change the script for that ...