As leatherback suggested, you should use the [noparse]
[/noparse] bbcode tags whenever you post PHP code; it helps us read and analyze the code.
As for your problem, the code in this if() statement:
if(copy($_FILES['uploadfile']['tmp_name'], $fullpath))
{
$sql = "
logopath = '$fullpath',
logourl = '$path'
WHERE id=$id";
}
overwrites your previous $sql declaration. I believe what you intended to do was instead append data onto the end; try using the '.=' operator instead.
Also note that you've got a couple of potential issues with your SQL handling at the bottom:
If an error occurs, you should never display the MySQL error message to the user - that isn't anything they need to know. Instead, this should be something you log for troubleshooting purposes.
If no rows match the query, mysql_query() will execute just fine but the mysql_fetch_array() call will produce an error. Perhaps you should first check that a row was returned before you attempt to access it.
If the file isn't being uploaded either, then you also need to debug that part of the upload process; check if any error code was set in the $_FILES array, and ensure that error_reporting is set to E_ALL so you can catch any errors PHP is reporting.