Thread: New
View Single Post
  #1 (permalink)  
Old 2005-04-30, 08:56 PM
Sharon Sharon is offline
Junior Member
 
Join Date: Apr 2005
Posts: 4
Sharon
Default

I am trying to configure a script. I am trying to upload a picture. At first I wasn't able to upload because it said the permission was denied. So I changed that. Now it says uploaded picture but it's not in my database.

Here's my code. Is it the $mysql1 operator

if (move_uploaded_file($_FILES['picture']['tmp_name'], $uploaddir . $picture)) {
$size = getFileSize($uploaddir.$picture);
} else {
printMessage("Error uploading file");
}

$sql1 = "INSERT INTO `listings_pictures` ";
$sql1 .= "(`title`,`file`,`size`,`listings_id`) VALUES ";
$sql1 .= "('$title','$picture','$size','$id')";

if (@mysql_query($sql1)) {
} else {
printMessage("Error Uploading Picture (" . mysql_error() . ")");
}

}

New and confused...
Reply With Quote