I have a simple form like this:
<form>
<label>Subject</label>
<input id="subjec_input" name="subject_input" type="text">
<label>Message Body</label>
<textarea id="body_input" name="body_input"></textarea>
<button id="submit_btn" name="submit_btn">Submit</button>
</form>
I want to take the input from the form and put subject_input
into a
and body_input
into b
<?php send_msg( 2, 'a', 'b' );?>
At the moment I have this code which fires the function on page load but I want it to only fire when the user clicks submit.
I have tried using get
but have not been successful