how to delete a folder using php script?

i assume there is a directory name in the or path in the database?

if so then say your query is something like this. This is assuming the directory is empty

$get_user_dir = mysql_query("SELECT path FROM database WHERE field='$something'");
$info = mysql_result($get_user_dir,0);

if(is_dir($info)){
rmdir($info);
$delete_user_dir = mysql_query("DELETE FROM database WHERE path='$info'");
}
 
Back
Top