title: TypeError: Illegal constructor
body: <p>I'm trying to do a webpage that writes javascript arrays into a mySql table using ajax to call .php scripts. When I click on my div (.button) I get this error from jQuery.min library - <code>TypeError: Illegal constructor.</code>, never seen it before. Any idea what's wrong? Didn't put up a fiddle, since there's a .php file, uploaded whole thing to <a href="http://topdeckandwreck.com/mySql%20shenanigans/" rel="nofollow">here</a> if you want to see it in action. Thanks for the help</p>
  
  <p>html:</p>
  
  <pre><code>    &lt;!doctype HTML&gt;
  &lt;head&gt;
  
  &lt;meta charset="UTF-8"&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  tis just a blank page to get scripts and whatnot
  &lt;br&gt;
  &lt;br&gt;
  &lt;div class="button"&gt;CLICK&lt;/div&gt;
  
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; 
  &lt;script src="index.js"&gt;&lt;/script&gt;
  
  &lt;/body&gt;
  </code></pre>
  
  <p>javascript:</p>
  
  <pre><code>var strings = [];
  
  for(x=0;x&lt;45;x++) {
      strings.push([1,2,3]);
  }
  
  $('.button').click(function() {
      makeAjaxRequest();
      });
  
  function makeAjaxRequest() {
      $.ajax({
          url: 'write.php',   //where I'm sending data
          type: 'get',    //data type post/get
          data: {name: $(strings)},   //The data to be send in a query string format or JSON
          success: function(response) { //A callback function to be executed is the request was succesful. A ‘response’ variable will be returned.
              console.log(response);
          }
      });
  }
  </code></pre>
  
  <p>php:</p>
  
  <pre><code> &lt;?php
  $servername = "localhost";
  $username = "topdecka_wtAdmin";
  $password = "OnlyWr1te";
  $dbname = "topdecka_writeTest";
  
  $data = "%".$_GET['name']."%";  //data passed from strings variable
  try {
      $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
      // set the PDO error mode to exception
      $conn-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  
      // sql to create table
      $sql = "CREATE TABLE strings (
      id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
      strings TEXT NOT NULL,
      INSERT INTO strings (strings)
      VALUES ('$data')    
      )";
  
      // use exec() because no results are returned
      $conn-&gt;exec($sql);
  
      echo "Table string created successfully";
      }
  catch(PDOException $e)
      {
      echo $sql . "&lt;br&gt;" . $e-&gt;getMessage();
      }
  
  $conn = null;
  ?&gt;
  </code></pre>