PDA

View Full Version : Deleting a file


Jacobb123
10-24-2007, 07:18 PM
I have a script that creates an XSPF file when users upload a song. The player looks for this .XSPF file and then includes the player if it is there if it is not there it posts a message that states that the user has not uploaded any songs. What I need to do is if a user removes all of his songs then the .XSPF file will be deleted. How can I do this?
This is what I have so far

$sql = "SELECT * from music_songs where member_id = '$XML_Member_ID'";
$num_rows=mysql_num_rows($sql)
if (num_rows==0&file_exists(xspf/$XML_Member_ID.xspf){}

I am just looking for the part of how to delete the file. Thanks

Jacobb123
10-24-2007, 07:49 PM
Figured it out...unlink