Hii'm getting this error, Parse error: syntax error, unexpected T_LOGICAL_AND in on this line And user = '{$user}'"; but dont think the error is there, anyone have any idea how to fix this error thanks.code:
<?php$checkbox = $_POST['checkbox'];$delete = mysql_real_escape_string(strip_tags($_POST['delete']));$user = mysql_real_escape_string($_SESSION['id']);$img = mysql_real_escape_string(strip_tags($_POST['img']));if($delete){ for($i=0;$i>$count;$i++) { $del_id = $checkbox[$i]; // Get the image path. $img_q = mysql_query("SELECT `img` FROM messages WHERE id = '{$del_id}' And user = '{$user}'") or die(mysql_error()); if(mysql_num_rows($img_q) > 0) { $img = mysql_result($img_q, 0); } unlink($img); And user = '{$user}'"; $sql = "DELETE FROM messages WHERE id = '{$del_id}' And user = '{$user}'"; mysql_query($sql, $conn) or die('Error in query:<br>'. $sql .'<br>'.mysql_error($conn).'<br>Time of Error: '.date("l F j, Y, G:i:s T")); } if($result){ echo "<meta http-equiv=\"refresh\" content=\"0\">\n"; }} mysql_close();