title: Updating data into MySql database using PHP Form
body: <p>I hope there is someone who can help me. I'm trying to update data into a MySql database using a PHP form with a textarea. 
  As long as I update the database with a random string, which is defined at the beginning of the page, it works fine. But when I try to update the database with the $_POST['text'] I receive from the form, the value in the database is not updated.</p>
  
  <p>I really have no idea what the problem is, so I hope there is someone who can help me to make this work. Please let me know if my question isn't clear enough.</p>
  
  <p>test.php</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
    &lt;script type="text/javascript" src="./js/tinymce/tinymce.min.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
      tinymce.init({
        selector: "textarea",
        plugins : 'advlist autolink autoresize autosave link image lists charmap media paste preview spellchecker',
        image_advtab: true
      });
    &lt;/script&gt;
  &lt;/head&gt; 
  
  &lt;body&gt;
    &lt;?php
      $con=mysqli_connect("example.com","test","abc123","my_db");
      // Check connection
      if (mysqli_connect_errno())
      {
        echo "Failed to connect to MySQL: " . mysqli_connect_error();
      }                                  
  
      $result = mysqli_query($con,"SELECT content FROM page_content WHERE page = 'Zangpedagoog'");
  
      while($row = mysqli_fetch_array($result))
      {
        $text=$row['content'] ;
      }    
    ?&gt;
  
    &lt;form method="post" action="./send.php"&gt;
      &lt;textarea name="text" width="100%"&gt;
      &lt;?php echo $text ?&gt;
      &lt;/textarea&gt;
      &lt;input id="submit" name="submit" type="submit" value="Send"&gt;&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>send.php</p>
  
  <pre><code>&lt;?php
    $update = $_POST['text'];
    echo $update;
  
    $random = '123456';
    echo $random;
  
    $con=mysql_connect("example.com","test","abc123","my_db");
    // Check connection
    if (!$con)
    {
      echo "Failed to connect to MySQL: " . mysql_connect_error();
    }
  
    mysql_query("UPDATE page_content SET content=$update WHERE page='Zangpedagoog'",$con);
  
    mysql_close($con);
  
  ?&gt; 
  </code></pre>