I am using codeigniter where i put the post backend coding under models/add_subscriber.php but the code not being hit. Any idea?
form.onsubmit = function(event) { validate(); if (!isValid) { revalidateOnChange(); return false; } var email = $("#signup_email").val(); dataString = 'email=' + email; $.ajax( { type: "POST", url: '<?php echo base_url()?>models/add_subscriber.php', data: dataString, success: function(response) { alert(response); }, error: function(xhr, textStatus, error) { } }); return; };
<?php echo base_url(); ?>home/add;not the one you specified.