PHP submitting a form with multiple submit buttons using jQuery .post()
问题 I have the following HTML code: <form method="post" action="the_file.php" id="the-form"> <input type="text" name="the_input" value="<?php if ( isset( $_POST['the_input'] ) echo $_POST['the_input]; ?>"> <button type="submit" name="eat_something" value="TRUE">Eating</button> <button type="submit" name="eat_something" value="FALSE">Don't Eat</button> </form> <textarea id="result"></textarea> Followed by this JS: $('#the-form').bind('submit', submitForm); function submitForm(evt) { jQuery.post( $