I am trying to take input values from a form and output the results within a string. I don't want to use a database to do so.
Is this possible? Do I have to run the variables through a function? If so how can I go about it?
I'm new to react so providing pseudo-code could possibly make this more difficult than it needs to be but I will do my best.
<div className="form">
<form
name="contact"
method="POST"
>
//variable name
<input name="name" placeholder="Your Name" type="text" />
//variable age
<input name="age" placeholder="Your Age" type="number" />
//submit
<button>Send</button>
</form>
</div>
Based on the form above I expect to be able to somehow fetch the input values in the form after submit and have them display within a string.
Ex: Your name is "name" and your age is "age".
The result would be displayed on the same page if possible.
Thank you in advance for any help provided.