1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

unlink - need help

Discussion in 'PHP' started by bluemouse2, Aug 13, 2006.

  1. #1
    Hi!
    Can you please help me delete several files with unlink?
    
    $sql = "select filename from $aaa where owner='$id'";
    		$result = mysql_query($sql) or die("Failed: $sql");
    		$resrow = mysql_fetch_row($result);
    		$filename = $resrow[0];
    	        @unlink("./files/".$filename);
    PHP:
    this code deletes only one file.
    there are several files to delete.

    where do i go wrong? thanks.

    SOLVED!
    SEMrush
    while ($resrow = mysql_fetch_array($result))
    @unlink("./files/".$resrow[0]);
     
    bluemouse2, Aug 13, 2006 IP
    SEMrush