I am trying to delete a few files in a loop. It is not working and just curious if someone could offer some oversight, thanks.
`
<?
$sqlz = "SELECT lessonid, imagelesson FROM steam_lessons WHERE lessonid = ".$idToDelete."";
$resultx = mysqli_query($con, $sqlz);
$root = str_replace('\', '/', $_SERVER['DOCUMENT_ROOT']);
while ($rowx = mysqli_fetch_array($resultx)) {
$delimage = unlink(''.$root.'/images/thumbs/'.$rowx[imagelesson].'');
$delimage .= unlink(''.$root.'/images/large/'.$rowx[imagelesson].'');
echo $delimage;
}
?>
`