title: trying to post data into table with php & sql - getting "Notice: Undefined index:..."
body: <p>Here's the html:</p>
  
  <pre><code>&lt;form action="php/buzz_data.php" method="get"&gt;
  
      &lt;div&gt;Image: &lt;input type="text" name="buzz_img" size="30" /&gt;&lt;/div&gt;
      &lt;div&gt;Link: &lt;input type="text" name="buzz_link" size="30" /&gt;&lt;/div&gt;
      &lt;div&gt;Description:  &lt;textarea rows="5" cols="30" name="buzz_desc"&gt;&lt;/textarea&gt;&lt;/div&gt;
      &lt;div&gt;Title: &lt;input type="text" name="buzz_title" size="30" /&gt;&lt;/div&gt;
  
      &lt;input type="submit" value="Submit" /&gt;
      &lt;input type="submit" value="Clear" /&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p>Here's the php:</p>
  
  <pre><code>&lt;?php
  $con = mysql_connect("localhost","***","***");
  if (!$con)
    {
    die('Could not connect: ' . mysql_error());
    }
  
  mysql_select_db("ubook247", $con);
  
  $sql="INSERT INTO buzz_data (buzz_page_title, buzz_img, buzz_link, buzz_desc, buzz_title)
  VALUES
  ('$_POST[buzz_page_title]','$_POST[buzz_img]','$_POST[buzz_link]','$_POST[buzz_desc]','$_POST[buzz_title]')";
  
  if (!mysql_query($sql,$con))
    {
    die('Error: ' . mysql_error());
    }
  echo "1 record added";
  
  mysql_close($con)
  ?&gt; 
  </code></pre>
  
  <p>and here's the result:</p>
  
  <p>Notice: Undefined index: buzz_img in C:\wamp\www\ubook247\php\buzz_data.php on line 12</p>
  
  <p>Notice: Undefined index: buzz_link in C:\wamp\www\ubook247\php\buzz_data.php on line 12</p>
  
  <p>Notice: Undefined index: buzz_desc in C:\wamp\www\ubook247\php\buzz_data.php on line 12</p>
  
  <p>Notice: Undefined index: buzz_title in C:\wamp\www\ubook247\php\buzz_data.php on line 12</p>
  
  <p>1 record added</p>
  
  <p>The db and table are both correctly set up as a new record was created, it just didn't add the data from the inputs.</p>