Hi, I have created a form where people can update their information with the option of deleting their picture using a checkbox. If a person wishes to to delete their picture, all they need to the do is click on the checkbox and their picture will be removed when the form is updated. My problem is that I can not get my script to unlink and delete the image location from my database. The update script for the other form fields works fine. I'm not sure what I am doing wrong as I do not receive any error messages. Here's my unlink code: [code]$editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if (isset($editFormAction)) { if ((isset($_POST['remove_pic'])) && ($_POST['remove_pic'] == "cbox")) { mysql_select_db($database_conn, $conn) or die(mysql_error()); $id = (isset($_POST['id'])) or die(mysql_error()); $sql = "Select file from table Where id = '" .$id. "' " or die(mysql_error()); $result2 = mysql_query($sql, $conn) or die(mysql_error()); $ddata2 = mysql_fetch_assoc($result2) or die(mysql_error()); $name = $ddata2['file'] or die(mysql_error()); if (is_file($name)) { unlink($name) or die(mysql_error()); } } }[/code] Here's my form code: [code]<?php if ($row_info['file']!= "") { echo '<tr><td nowrap div align="right" class="style6">Current Picture</td> <td><img src="' .$row_info['file']. '"></td> </tr><tr><td nowrap div align="right" class="style6">Delete Current Picture?</td><td><input type="checkbox" name="remove_pic" value="cbox"></td><td class="style14">(To delete your picture, tick the checkbox) </td></tr>'; } else { echo ""; } ?>[/code] I also have a hidden field in my form that has the account id in it. I appreciate any help in helping me to get my script to work. Thanks in advance