what is coding to allow users to upload a picture in database?

You would create that segment of the form and then in the script which processes the date you need to have a variable which defines the target path.

Something like this for the form component:

<input type="hidden" name="userfilename" id="userfilename">
<span class="input_title">Choose a file to upload:</span>
<input name="uploadedfile" type="file" />

And then depending on what you are using to process that field you will need to specify the path and I recommend validating to make sure they can't upload certain extensions like executable which will destroy your database.

//$target_path = "uploads/";

// Where the file is going to be placed 
$target_path = 'C:/websites/uploads/'.$_FILES['uploadedfile']['name'];

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
    //echo "The file ".  basename( $_FILES['uploadedfile']['name']). " has been uploaded";
} else{
    echo "There was an error uploading the file";
    print_r($_FILES);
}
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.