I'm on a dilemma about "how to use the POST method to store data sent from my form". Below is my form:
<form class="myForm">
    <div class="form-group">
        <label for="nameForm">Name</label>
        <input type="text" class="form-control" id="nameForm" placeholder="Your name here">
    </div>
    <div class="form-group">
        <label for="selectForm">Your college year</label>
        <select class="form-control" id="selectForm">
            <option>1</option>
            <option>2</option>
            <option>3</option>
            <option>4</option>
            <option>5</option>
        </select>
    </div>
    <div class="form-group">
        <label for="textForm">Comment(s)</label>
        <textarea class="form-control" id="textForm" rows="3" placeholder="Leave your comment(s) here"></textarea>
    </div>
    <button type="submit" class="btn btn-primary">Send</button>
</form>
All that I want is when the users submit their answers it will be stored in a .json file, using POST method and jQuery. But how to use this method? What do I need to have to contain a .json file that store my form datas?
NOTE: How do I know the correct URL to use in POST method? I mean:
$.post( "urlHere", function(data) {
   $(".result").html(data);
});
Thanks in advance, hope you guys can help me with this! Best regards!
 
    