<script>
function myFunction() {
var query = '?';
var str = $( "form" ).serialize();
$( "#results" ).text( query += str );
}
$( "input[type='sel'], input[type='text']" ).on( "submit", myFunction );
$( "select" ).on( "submit", myFunction );
myFunction();
</script>
echo'<input id="submit" type="submit" value="SUBMIT" class="btn btn-success" name="submit" onclick="myFunction()"/> ';
echo '<p id="results"> </p></form>';
how to make this work onclick event and also query string should print on the
tag and what will be the code for insertion please let me knoe the answer
for eg: ?gender='Male'&city='dwd'