Reputation: 717
as i told, i need a form that send some information to another page but do not go to action page. is it possible? a form is like this:
<form name="form2" method="post" action="send.php">
<input type='text' name='name' id='name' value='ali'/>
<input type='text' name='id' id='id' value='123'/>
<input type='text' name='family' id='family' value='ali'/>
</form>
i want when i click on button, just send information. is it possible or needs to use of session?
Upvotes: 0
Views: 32
Reputation: 4097
Use ajax:
var name = $('#name').val();
var id = $('#id').val();
var family = $('#family').val();
$.ajax({
url : 'send.php',
type : 'post',
data : {name:'name',id:'id',family:'family'}
});
Upvotes: 2