How to prevent from page refresh on submit button click
问题 i have form with one input and one submit button. <form method='POST' action='' enctype='multipart/form-data' id="form_search"> <input type='hidden' name="action" id="form_1" value='1' /> </span><input id="query" type="text" name="mol" value=""> <input type='submit' value='Search' name="Search" id="Search" /> on form submission form input data goes to php below code if (isset($_POST['Search'])) { $_SESSION["query"] = $_POST["mol"]; $_SESSION["action"] = $_POST["action"]; } i want to avoid