title: Pass value from html form to php without submitting the form
body: <p>I have a text box. I want to take user input from there and pass it to PHP without using submit button. I would prefer a normal button and <code>onclick</code> should pass data to PHP.</p>
  
  <p>Here is something I heard: </p>
  
  <ul>
  <li>you can call a JS function <code>onclick</code> and then you can submit the form
  from there</li>
  </ul>
  
  <p>But I want to be on the same page after submitting the form. That's why I didn't want to submit the form in the first place. But looks like there is no other way.</p>
  
  <p>If anyone knows about the submit method, please, help.</p>