Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8436649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:14:16+00:00 2026-06-10T07:14:16+00:00

I am making an application on my server, where the user uploads an image

  • 0

I am making an application on my server, where the user uploads an image through some HTML combined with javascript.

The user finds an image on the computer through

<form action="uploadimage.php" method="post"
enctype="multipart/form-data">
<label for="file">Filnavn:</label>
<input type="file" name="file" id="file" value="100000" />

Then the point behind the javascript, is to validate on the users image

if(picture_headline.value == "" || picture_uploaded.value == "" || !ischecked)
{
   // Don't execute, stay on same site
}
else
{
   // execute php and upload image
}

the php is an upload image php script

<?php 
// The file is being uploaded into the folder "upload"
$target = "/navnesutten.eu/facebook/uploads/"; 
// add the original filename of our target path
$target = $target . basename( $_FILES['uploaded']['name']) ; 
$ok=1; 
// Moves the uploaded file into correct folder
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) 
{
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
} 
else {
echo "Sorry, there was a problem uploading your file.";
}
?> 

I must say I am a bit confused here, since I have only been working with html, php and javascript for a few days now.

Am I totally off or what?

I found some “simple” examples online, which I put on my server through cuteFTP, but everytime i press upload, the website just sends me to the .php file and says the site doesn’t exist.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T07:14:18+00:00Added an answer on June 10, 2026 at 7:14 am

    Each array key in $_FILES corresponds with the name attribute of a file field in the form, so to match your form it should be 'file' rather than 'uploaded' or 'uploadedfile':

    <?php 
    // The file is being uploaded into the folder "upload"
    $target = "/navnesutten.eu/facebook/uploads/"; 
    // add the original filename of our target path
    $target = $target . basename( $_FILES['file']['name'] ) ; 
    $ok=1; 
    // Moves the uploaded file into correct folder
    if(move_uploaded_file($_FILES['file']['tmp_name'], $target)) 
    {
    echo "The file ". basename( $_FILES['file']['name']). " has been uploaded";
    } 
    else {
    echo "Sorry, there was a problem uploading your file.";
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making an iphone application which has user information on a web server.
I am making an server control application ( simple with some buttons to start/stop
i m making a rmi based client server application. At Server side, it consists
Im making an application in cocoa and wanted to see if some strings in
I making an application to view videos form youtube, and I think it is
I'm currently making an application with Backbone.js and some JQuery libraries. Today I work
I'm making an application server client using tcp sockets in c# .. The application
I am making an application that connects to remote mysql database into some cpanel
I'm making a little application that needs to know how long the user has
Im making a client-server application so i need to shutdown the remote pc Silently

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.