PDA

View Full Version : Very Urgent


saranya
04-19-2007, 08:17 AM
$relatedfiles = "uploads/";

$related_files = $relatedfiles . basename( $_FILES['uploadfile']['name']);
print $related_files;

if(move_uploaded_file($_FILES['uploadfile']['tmp_name'], $related_files)) {
echo "The file ". basename( $_FILES['uploadfile']['name']).
" has been uploaded";
}
else
{
echo "There was an error uploading the file, please try again!";
}

$addFile = "insert into tproblem(tech_id,category_id,error_description,related_files,solution,reference_sites,suggestion) values('$id','$cid','$error_description','$related_files','$solution','$reference_sites','$suggestio n')";

$resultFile = mysql_query($addFile) or die(mysql_error());



IS THERE ANYTHING WRONG IN MY CODING. THE FILES ARE NOT SAVED IN THE FIELD RELATED_FILES JUST IT STORED AS (BLOB) AND SOME ICON WHEN WE CLICK IT SHOWS THE FIELDVIEWER LAYOUT THE PATH IS DISPLAYED.
I WANT TO STORE THE PATH IN THE RELATED_FILES .CAN ANYBODY HELP ME PLEASE.

maghiel
04-19-2007, 04:16 PM
if you bother to type the question in smallcaps and with reading things like commas and points i might bother to have a look

Fumigator
04-19-2007, 05:39 PM
Have a look at the posting guidelines (http://www.codingforums.com/postguide.htm).