PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
i want a user to be able to press a link that deletes a record from a database and a file at the same time. I know how to delete from a database but how do i delete a file from the directory?
I could give you an easy example but it'll be better for you if you do it yourself . Check out: http://us2.php.net/unlink. If you need it, $_SERVER['DOCUMENT_ROOT'] will start the path to the file at the root directory.