title: Text form can't accept apostrophes
body: <p>My text forms won't allow single " ' " to occur in the input fields. I get an sql syntax error. Is there any good way to allow single apostrophes to be allowed in my text field?</p>
  
  <p>here's my code</p>
  
  <p>html
        </p>
  
  <pre><code>   &lt;input class='what' type='text' name='one' required&gt;
      &lt;textarea name='two' required&gt;&lt;/textarea&gt;
      &lt;input type='submit'&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>My database</p>
  
  <pre><code>  // Create connection
      $conn = mysqli_connect($servername, $username, $password, $dbname);
      // Check connection
      if (!$conn) {
          die("Connection failed: " . mysqli_connect_error());
      }
  
      $sql = "INSERT INTO whatsgood (one, two)
      VALUES ('$one', '$two')";
  
      if (mysqli_query($conn, $sql)) {
          echo "New record created successfully";
      } else {
          echo "Error: " . $sql . "&lt;br&gt;" . mysqli_error($conn);
      }
  
      mysqli_close($conn);
      ?&gt;
  </code></pre>
  
  <p>any help would be very appreciated. Thank you! </p>