Hi, I am trying to insert an image path name into mysql. I not sure how to insert the path only if the path name "image name" does not exist. Also, I get duplicate rows when uploading image path name, not sure why. Here is some code. Any suggestions would be appreciated.
//insert image path $insert = mysql_query("INSERT INTO mystuff.image(user_id, image_id, name)VALUES('$_POST[hiddenField]','','$file')"); echo mysql_error();
$file is the image name and the hiddenField is user_id of the logged in user.