title: form to database connection
body: <p>I have a form that is not working correctly with the database. Please help
  I used a newsletter.php code that I already had and edited the login information to fit this clients needs. Any help is appreciated.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>&lt;form method="post" action="newsletter.php"&gt;
                  &lt;div class="row half"&gt;
                      &lt;div class="6u"&gt;&lt;input type="text" class="text" name="name" placeholder="Name" /&gt;&lt;/div&gt;
                      &lt;div class="6u"&gt;&lt;input type="text" class="text" name="email" placeholder="Email" /&gt;&lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="row half"&gt;
                      &lt;div class="12u"&gt;
                          &lt;textarea name="message" placeholder="Message"&gt;&lt;/textarea&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="row"&gt;
                      &lt;div class="12u"&gt;
                          &lt;ul class="actions"&gt;
                              &lt;li&gt;&lt;input type="submit" value="Send Message" /&gt;&lt;/li&gt;
                          &lt;/ul&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/form&gt;
  </code></pre>
  
  <p>newsletter.php</p>
  
  <pre><code>&lt;?php
  error_reporting(E_ALL);
  
  define('DB_NAME', 'Newsletter');
  define('DB_USER', '*****');
  define('DB_PASSWORD','******');
  define('DB_HOST','50.62.209.154:3306');
  
  $link=mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
  
  if (!$link) {
      die('Could not connnect to the database' . mysql_error());
  }
  
  $db_selected=mysql_select_db(DB_NAME, $link);
  
  if (!$db_selected) {
      die('Can\'t use' . DB_NAME . ':' . mysql_error());
  }
  
  echo 'Connected Successfuly';
  
  $value = $_POST['name,email,message']; 
  $sql = "INSERT INTO newsletter (name, email, message) VALUES ('$value')"; 
  echo "value=$value sql=$sql";
  
  if (!mysql_query($sql)) {
      die('Error: ' . mysql_error());
  }
  
  mysql_close();
  ?&gt;
  </code></pre>