Ben senaryoyu yazdık ve benim test sunucusu üzerinde sadece iyi iş gibi görünüyor ama benim canlı sunucu kullanır çalıştığınızda bu tabloya sql bilgi eklemek olmaz.
Burada komut:
mysql_connect("$host", "$username", "$password")or die("cannot connect server ");
mysql_select_db("$db_name")or die("cannot select DB");
$title=$_POST['title2'];
$description=$_POST['description'];
$uploaded = $_POST['uploaded'];
$target = "../../projects/forms/";
$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.";
}
$result=MYSQL_QUERY("INSERT INTO $tbl_name(title, description, target) ". "VALUES ('$title', '$description', '$target')");
$id= mysql_insert_id();
print "File ID: <b>$id</b>";
print "Title: <b>$title</b>";
print "Description: <b>$description</b>";
print "File Name:</b>$target";
print "To upload another file Click Here<br>";