Member Avatar for ee96ddo

Hi, I am trying to upload files with an upload.php program. This works fine on my localhost but not on my godaddy server.

This is the code:

<?php
$target = "upload/";
$target = $target . basename( $_FILES) ;

$ok=1;
if(move_uploaded_file($_FILES, $target))
{
echo "The file ";
echo basename( $_FILES) ;
echo " has been uploaded";
}
else {
echo "Sorry, there was a problem uploading your file.";
echo "Error: " . $_FILES["file"]["error"] . "<br />";

}
?>

I was just wondering if I had to put my godaddy username and password in the code for it to work. And if I do, how :(

Thanks.

Member Avatar for ee96ddo

I have got an upload folder on godaddy :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.