gibson18
%Europe/Berlin %716 %2005, 18:11
Ik wil dat aan een variable een link wordt toegewezen die bestaat uit:
Dus http://mijndomein.be/uploads/[naam van het geuploade bestand]
Het laatste deel komt dus uit een uploadformulier.
code uploadform tot nu toe:
/ Where the file is going to be placed
$target_path = "uploads/$dir/";
// Add the original filename to our target path. Result is "uploads/$dir/filename.extension"
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
$_FILES['uploadedfile']['tmp_name']; // This is how we will get the temporary file...
$target_path = "uploads/$dir/";
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
$query = "INSERT INTO tblupload VALUES ('$ID','$dir','$autheur','$link')";
mysql_query($query);
vraag is dus hoe bouw ik deze variable op.
Groeten
jordi
Dus http://mijndomein.be/uploads/[naam van het geuploade bestand]
Het laatste deel komt dus uit een uploadformulier.
code uploadform tot nu toe:
/ Where the file is going to be placed
$target_path = "uploads/$dir/";
// Add the original filename to our target path. Result is "uploads/$dir/filename.extension"
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
$_FILES['uploadedfile']['tmp_name']; // This is how we will get the temporary file...
$target_path = "uploads/$dir/";
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
$query = "INSERT INTO tblupload VALUES ('$ID','$dir','$autheur','$link')";
mysql_query($query);
vraag is dus hoe bouw ik deze variable op.
Groeten
jordi