title: What does this undefined index message mean
body: <p>this code calls the values entered into a form and enters them into a database (or at least it's supposed to) every time the page loads it gives "undefined index" messages, and I am struggling to determine why.</p>
  
  <p>Any help that can be offered to me is greatly appreciated!</p>
  
  <pre><code>&lt;?php
  
  $dbc=mysql_connect('localhost', 'user', '');
  mysql_select_db('database', $dbc);
  
  
  
  $sqlInsertString = "INSERT INTO band_information (Name, Photo, Bio, City, State, Zipcode, Genre, Link)
              VALUES ({$_POST['bandname']}, {$_FILES['bandphoto']['name']}, {$_POST['bandbio']}, {$_POST['bandcity']},
                      {$_POST['bandstate']}, {$_POST['bandzipcode']}, {$_POST['bandgenre']},{$_POST['bandlink']});";
  
  if($_SERVER['REQUEST_METHOD']=='POST'){
      if(move_uploaded_file($_FILES['bandphoto']['tmp_name'], "C:\\HTML\\mgertenbach\\BAND\\photos\\{$_FILES['bandphoto']['name']}") &amp;&amp; $mysql_query($sqlinsertString, $dbc)){
          print '&lt;p&gt;Thanks for submitting your band!&lt;/p&gt;';
      } else {
          print '&lt;p&gt;Could not submit band because: &lt;br/&gt;' .
          mysql_error($dbc) . '&lt;/p&gt;';
      }
  }   
  </code></pre>