<form method="post" class="af-form-wrapper" action="http://www.aweber.com/scripts/addlead.pl">
I am creating an application where submitting from to aweber but I also need input fields to store on db. But I also need that inputs to store inv database at my end how can I get them in PHP as we can't have two actions.
You can use javascript or jquery
when your submit button clicked you can send form data to your url and also you can post that data to your controller then you can insert it to the database.
<form id='myform' method='post'>
<input />
<input />
<button id='submit'></button>
</form>
$('#submit').on('click', function(){
$.ajax({
'dataType': 'json',
'type': 'POST',
'data': $('#myform').serialize(),
'url': 'http://www.aweber.com/scripts/addlead.pl',
success: function (data) {
//what ever you want to do with the return data
}
})
$.ajax({
'dataType': 'json',
'type': 'POST',
'data': $('#myform').serialize(),
'url': 'your code igniter controller url',
success: function (data) {
//what ever you want to do with the return data
}
})
})