title: POST value from html select list?
body: <p>i am trying to send some information to insert-event.php. Every piece of data comes through, except the options listed in my SELECT.</p>
  
  <pre><code>     &lt;form action="php/insert-event.php" method="post"&gt;
          &lt;select id="skoleDropdown" name="skole"&gt;&lt;option hidden&gt;Velg skole&lt;/option&gt;"' . $skoleAttributter . '" &lt;/select&gt;
          &lt;input type="text" name="Title" placeholder="Tittel" class="ico-title" required&gt;&lt;/input&gt;
          &lt;input type="text" name="description" placeholder="Beskrivelse" class="ico-title" required&gt;&lt;/input&gt;
          &lt;input type="text" name="pris" placeholder="Pris i NOK" class="ico-title" required&gt;&lt;/input&gt;
          &lt;input type="date" name="date" class="ico-title" required&gt;&lt;/input&gt;
          &lt;input type="text" name="img_url" placeholder="Bildelenke" class="ico-title" required&gt;&lt;/input&gt;
          &lt;input type="text" name="type" placeholder="Type arrangement" class="ico-title" required&gt;&lt;/input&gt;
          &lt;input type="submit" name="submit" value="LEGG TIL"&gt;&lt;/input&gt;
       &lt;/form&gt;
    &lt;/div&gt;';
  </code></pre>
  
  <p>And then i have my insert-event.php:</p>
  
  <pre><code>&lt;?php
  $title = $_POST['Title'];
  $pris = $_POST['pris'];
  $date = $_POST['date'];
  $url = $_POST['img_url'];
  $description = $_POST['description'];
  $school = $_POST['skole'];
  $schoolId = '';
  $type = $_POST['type'];
  
  switch($school) {
      case 'Campus Brennerviveien';
      $schoolId == 1;
      break;
  
  case 'Campus Vulkan';
      $schoolId == 2;
      break;
  
  case 'Campus Fjerdingen';
      $schoolId == 3;
      break;
  }
  
  // Connect and select DB
  $connect =  mysqli_connect('localhost', 'chris', 'chris');
  if (!$connect) {
      echo 'Not connected';
  }
  
  if (!mysqli_select_db($connect, 'eksamen')) {
      echo 'Database not selected';
  }
  
  // Submit
  $sql = "INSERT INTO events (id, title, description, pris, img_url, date, type, skole_id)
    VALUES (NULL, '$title', '$description', '$pris', '$url', '$date', '$type', '$schoolId')";
  
  if ($connect-&gt;query($sql) === TRUE) {
      header("Location:../index.php");
      exit;
  } else {
      echo "Error: " . $sql . "&lt;br&gt;" . $connect-&gt;error;
  }
  $connect-&gt;close();
  
  ?&gt;
  </code></pre>
  
  <p>I think maybe this speaks for itself.</p>
  
  <p>Appreciate help.</p>
  
  <p>Thanks!</p>