title: How to deal with input-text in a text area that is not submitted and other problems
body: <p>I am working on a Dockerised container application that is a student grade checker. I need to connect this application to a running SQL container. I have it connected successfully but I am running into issues with how to deal with the input data.</p>
  <p>Here is where the input data is submitted:</p>
  <pre><code>&lt;/head&gt;
  &lt;body&gt;
  &lt;div id=&quot;sgc&quot;&gt;
      &lt;div id=&quot;logo&quot;&gt;
          Student Grade Checker App
      &lt;/div&gt;
      &lt;div&gt;
          &lt;textarea class=&quot;display-input&quot; id=&quot;input-text&quot; rows=&quot;5&quot; cols=&quot;35&quot; required minlength=&quot;2&quot; placeholder=&quot;Enter the module names and marks separated by comma [put each module in a new line]&quot; value=&quot;&quot;&gt;Enter the module names and marks separated by comma [put each module in a new line]&lt;/textarea&gt;
      &lt;/div&gt;
      &lt;div&gt;
          &lt;textarea class=&quot;display-output&quot; id=&quot;output-text&quot; rows=&quot;5&quot; cols=&quot;35&quot; readonly=1 placeholder=&quot;Results here...&quot; value=&quot;&quot;&gt;
          &lt;/textarea&gt;
      &lt;/div&gt;
      &lt;div&gt;
          &lt;button class=&quot;sgcbutton-active&quot; onclick=&quot;verify();getTotal();&quot;&gt;Total Marks&lt;/button&gt;
      &lt;/div&gt;
      &lt;div&gt;
  </code></pre>
  <p>The <code>textarea id=&quot;input-text&quot;</code> is where I want to take the information from to enter into my database, however the information is not submitted anywhere until other microservices are called such as <code>getTotal</code>.</p>
  <p>Here is the PHP that I have so far:</p>
  <pre><code>$conn = mysqli_connect($host, $user, $pass, $db, $port);
  
  if ($conn-&gt;connect_error) {
  die(&quot;Connection failed: &quot; . $conn-&gt;connect_error);
  }
  echo &quot;Connected to MySQL successfully!&quot;;
  
  &quot;input_text = document.getElementById('input-text').value&quot;;
  
  $ModuleMarks = $conn-&gt;real_escape_string($_REQUEST['input_text']);
  
  echo $ModuleMarks;
  
  $insertsql = &quot;INSERT INTO Module_Marks (Module) VALUES('$ModuleMarks')&quot;;
  
  $result = $conn-&gt;query($insertsql);
  
  if (!$result) {
  
  echo $conn-&gt;error;
  
  ?&gt;
  </code></pre>
  <p>I am getting &quot;Connected to MySQL successfully!&quot; returned so I believe my database connection is ok.</p>
  <p>I am getting an error output:
  <code>call to a member function real_escape_string() on Boolean.</code></p>
  <p>but my first question is help with how to deal with the input text.</p>
  <p>Thanks</p>