shousommers20 Posted January 20, 2013 Share Posted January 20, 2013 I'm getting this error. Fatal error: Call to undefined function delete() I'm trying to delete a photo. echo " <li class=\"image_list\"> <a href=\"javascript: create_window('$image_name', $image_size[0], $image_size[1])\" > <img src=\"/login/uploads/$image_name\" width=\"200\" height=\"200\" /> </a> <form action=\"modification_page.php\" method=\"post\"> <input class=\"delete_photo\" type=\"submit\" name=\"delete\" value=\"'$image_name'\" /> </form> </li>"; if($_SERVER['REQUEST_METHOD'] == 'POST'){ $delete = "/login/uploads/{$_POST['delete']}"; if(isset($_POST['delete'])){ delete($_SERVER["DOCUMENT_ROOT"].$delete); } else{ echo '<p> Error: Please refer to the website administrator.<p>'; } Link to comment Share on other sites More sharing options...
margaux Posted January 20, 2013 Share Posted January 20, 2013 Call to undefined function delete() php error messages tend to be quite helpful. Are you sure delete is a function? Try looking it up. 1 Link to comment Share on other sites More sharing options...
Recommended Posts