Is it possible to put a row ID in header()? I tried to put header() inside an if statement but I always got a message of: 
Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING)
Here's my code:
$result = mysqli_query($db_con,$query);
$target="Admin/upload/otherPic/".basename($_FILES['image']['name']);
if ($result){
    if(move_uploaded_file($_FILES['image']['tmp_name'], $target)){
        echo "<script>
            alert('Record updated successfully!');
            </script>";
        header("Location: admin-viewacc.php?id='$result['id'];'");
    }
    else{
        echo "Error updating record: " . mysqli_error($db_con);
    }
}
 
     
     
    