I have the following input and button tag in my HTML code:
<input id = "inputarea" type = "text" name = "inputarea" size = "40">
<button id = "sendMessage">Submit</button>
I want to take the value of the input tag and send it to a variable in my PHP file every time the user clicks on the button. I don't want to use a form tag because I don't want the HTML page to get redirected to the PHP file when the user clicks on the submit button. Instead, I simply want the input tag value to be sent to PHP where the value will be processed and then sent somewhere else. How can I do this?