How can I submit with 1 button and 1 form with 2 actions?
-
index.php
PHP MySQL Insert Tutorial Insert
2nd.php
minus
js
$('#myform').submit(function(){
return false;
});$('#insert').click(function(){
$.post(
$('#myform').attr('action'),
$('#myform :input').serializeArray(),
function(result){
$('#result').php(result);
}
);
}); -
index.php
PHP MySQL Insert Tutorial Insert
2nd.php
minus
js
$('#myform').submit(function(){
return false;
});$('#insert').click(function(){
$.post(
$('#myform').attr('action'),
$('#myform :input').serializeArray(),
function(result){
$('#result').php(result);
}
);
});You have already posted this in the Web Development forum: How can I submit with 1 button and 1 form with 2 actions? - Web Development Discussion Boards[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
You have already posted this in the Web Development forum: How can I submit with 1 button and 1 form with 2 actions? - Web Development Discussion Boards[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer