title: Update SQL Table with Text Area?
body: <p>i'm trying to make it so that a user can type text in a textarea and then this updates the mysql table 'bio' within the database 'ptb_profiles'.</p>
  
  <p>At the moment their information is being pulled into this textarea but i want it so that whatever they type in it updates the table.</p>
  
  <p>I'm using the following code but it's not working? im new to php and mysql so it's bound to be wrong.</p>
  
  <p>Any help would be really appreciated. thanks.</p>
  
  <pre><code>&lt;?php 
  //We check if the form has been sent
  if(isset($_POST['bio']))
  {
      $content = $_POST['bio'];
          //We remove slashes depending on the configuration
          if(get_magic_quotes_gpc())
          {
                  $content = stripslashes($content);
          }
          //We check if all the fields are filled
          if($_POST['bio']!='')
          {
              $sql = "INSERT INTO ptb_profiles.bio VALUES (NULL, '".$_SESSION['user_id']."', '".$message['bio']."');";
              mysql_query($sql, $connection);
  
              echo "&lt;div class=\"infobox-message\"&gt;Your Profile Information has been updated..&lt;/div&gt;";
          }
  }
  
  ?&gt;
  
  &lt;form action="&lt;?php $_SERVER['PHP_SELF'] ?&gt;" method="post"&gt;
  
  &lt;textarea id="bio"  rows="10" style="width: 456px; 
      margin-top:3px;
      text-align:left;
      margin-left:-2px;
      height: 122px;
      resize: none; 
      border: hidden;"&gt;&lt;?php echo $profile['bio'] ?&gt; &lt;/textarea&gt;
  
       &lt;input type="submit" name="send_button" id="send_button" value="Send"&gt;
  </code></pre>