I have an Interest areas in my page when i register new user and when leaving Interest Area selection filed default (empty) I'm getting this error Here is the code:
    91-    //Interest
    92-     foreach ($_POST['interest_id'] as $interest)
    93-     {
    94-         $query = "INSERT INTO user_interest (user_id, interest_id)
    95-                 VALUES  ('$user_id', '$interest')";
    96-         $result = mysqli_query($link,$query);
    95-     }
and this is my Interest Areas part in the page :
<label>Research Areas</label>
      <select name="interest_id[]" class="small-input" multiple>
        <?php 
            $query = "SELECT * FROM research_interest ORDER BY name ASC";
            $result = mysqli_query($link, $query);
            while($row = mysqli_fetch_object($result))
            {
        ?>
            <option value="<?php echo $row->id; ?>"><?php echo $row->name; ?></option>
        <?php
            }
        ?>
      </select>
    </p>