<?php 
 $target = "upload/"; 
 $target = $target . basename( $_FILES['uploaded']['name']) ; 
 $ok=1; 
 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.";
 }
 ?>

that's mean must create 'files' table? and 'target' is entity in 'files' table?

Recommended Answers

All 2 Replies

Member Avatar for diafol

Table?? MySQL table, HTML table?

Unclear.

That just moves the uploaded files to the upload folder, it doesn't record anything to the database, at least not with the code you presented.

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.