ok i use this code to add number to pic which uploads to server
PHP Code:
//This is the directory where images will be saved 
$target "uploads/"
$target $target .time().'_'.basename$_FILES['photo']['name']); 
now i need to know how to add that name to table in database
this is what i use at moment but it dosnt add the changed name

PHP Code:
//This gets all the other information from the form 
$state=$_POST['state']; 
$type=$_POST['type'];
$area=$_POST['area'];
$desc=$_POST['desc'];
$name=$_POST['name'];
$email=$_POST['email'];
$tel=$_POST['tel'];
$date date("d-m-Y");
$pname=($_FILES['photo']['name']); 
//Writes the information to the database 
mysql_query("INSERT INTO `register` VALUES ('$id', '$state', '$type', '$area', '$desc', '$name', '$email', '$tel', '$pname', '$date')");
//Writes the photo to the server 
if(move_uploaded_file($_FILES['photo']['tmp_name'], $target)) 


//Tells you if its all ok 
echo "The file "basename$_FILES['uploadedfile']['name']). " has been uploaded, and your information has been added to the directory"

else { 

//Gives and error if its not 
echo "Sorry, there was a problem uploading your file."
}  
//send the mail 
cheers
Doug