title: How to send information to database without reloading page?
body: <p>so, i´m trying to send some information to database with AJAX/PHP but without success, i´ve seen some codes from here but they are not working and I just get this error
  TypeError: 'stepUp' called on an object that does not implement interface HTMLInputElement.</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;form action="javascript:void;" id="putz" class="putz" method="POST" onsubmit="send()" enctype="multipart/form-data" &gt; 
                &lt;div class="box"&gt;
                  &lt;input type="text" name="name" id="name" required&gt;
                  &lt;label&gt;Name&lt;/label&gt;
                &lt;/div&gt;
                &lt;div class="box"&gt;
                  &lt;input type="text" name="email" id="email" required&gt;
                  &lt;label&gt;Email&lt;/label&gt;
                &lt;/div&gt;
                &lt;div class="box"&gt;
                  &lt;input type="text" name="pass" id="pass" required&gt;
                  &lt;label&gt;Password&lt;/label&gt;
                &lt;/div&gt;
                &lt;div class="Box"&gt;
                  &lt;p style="color: red; text-align: left; margin-left: 15px"&gt;Photo&lt;/p&gt;
                  &lt;input type="file" name="photo" style="margin-right: 140px; color: red;"&gt;
                &lt;/div&gt;
                &lt;button id="submit" type="submit"&gt;Submit&lt;/button&gt;
              &lt;/form&gt;
  </code></pre>
  
  <p>And here is my ajax/javascript </p>
  
  <pre><code>&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
       function send()
  {
   var name=document.getElementById( "name" );
   var email=document.getElementById( "email" );
   var pass=document.getElementById( "pass" );
    $.ajax({
      type: 'post',
      url: 'send.php',
      data: {
        name:name,
        email:email,
        pass:pass,
      },
    });
  }       
      &lt;/script&gt;
  </code></pre>
  
  <p>and the send.php code</p>
  
  <pre><code> &lt;?php 
      include_once('conn.php');
      $name = $_POST['name'];
      $email = $_POST['email'];
      $pass = $_POST['pass'];
      $photo = $_FILES['photo']['name'];
      $tmp_name = $_FILES['photo']['tmp_name'];
      move_uploaded_file($tmp_name, "img/foto_perfil/" . $photo);
      $sql = "INSERT INTO user (name, email, photo, pass) VALUES ('$name', '$email','$photo', '$pass')";
      mysqli_query($conn, $
  </code></pre>