I have a textarea whose contents I want to post to a database.
  <body>
 <div class="container">
   <div class="row">
     <form action="post-code.php" method='POST'>
     <textarea name="textEditor" id="textEditor"></textarea>
     <input type="submit">
   </form>
 </div>
post-code.php:
<?php
include "conn.php";
$code1 = $conn->real_escape_string($_POST['textEditor']);
$insert = "INSERT INTO Code_Stream (Code) VALUES ($code1)";
$resultinsert = $conn->query($insert);
if(!$resultinsert){
  echo $conn->error;
}else{
  echo "<p> Code is streaming... </p>";
}
?>
It keeps on telling me that the index 'textEditor' is undefined.
 
     
    