need help with PHP and AJAX - not able to generate lead and display success message
$.ajax ( {
type:‘get’,
data : $("#frm6").serialize(),
success: function(data){
$(‘form#frm6’).slideUp(“fast”, function() {
document.getElementById(‘strSubmitStatus’).value = 1;
$("#mail-status").html(data);
$(’#loader-icon’).hide();
});
},
error: function(){}
});
Not sure if I can help, but, what error are you getting? Have you debugged it yet?
What line(s) of code is it failing at? We can’t duplicated it without your data, but, you should be able
to debug it. Just "die(“got-here…”); in a few places and see what the outputs of the PHP section gives
you and if that part is good. Display your $request_data[] array and your $_REQUEST[] array and then
die() to see if they are set up as you are expecting. You can display them using something like this:
[php]
echo “
request-data array:
”;
print_r($request-data);
echo “
$_REQUEST array:
”;
print_r($_REQUEST);
die (“
DONE!
”);
[/php]
Then, you can put that just before the interest array comment and see if you have well formed data going
into your AJAX routine. The Ajax code seems straight forward, but, not really sure of it.
I doubt that will help, but, I think we need more info to help you. Good luck!