i am having a problem with photo uploading - here is the code
$photo_type = substr($_FILES['photo']['type'], 6);
$sql = mysql_query("UPDATE `chat_users` SET `photo` = '".$photo_type."' WHERE `id` = '".$id."';");
if(copy($_FILES['photo']['tmp_name'], "photos/".$id.".".$photo_type.""))
{
echo "Photo Uploaded Successfully<br/>";
everything goes ok as like as photo copied in the photos folder including all the other things.
but in sql chat users in photo field it only update the type of the photo for example gif or jpeg it won't update the full url like for example coding-talk.com/photos/1.gif?23232
can somebody help me !