Advertisement
Guest User

Untitled

a guest
Apr 27th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. jquery part
  2. $('#registration_form').on('submit',function(e){
  3. e.preventDefault();
  4. var datastring = $(this).serialize();
  5. $.ajax({
  6. method : "GET",
  7. url : "<?php echo base_url(); ?>Main/submit_registration_form",
  8. data: {datastring:datastring}
  9. })
  10. .done(function(msg){
  11. alert(msg);
  12. });
  13. });
  14.  
  15. php part
  16.  
  17. public function submit_registration_form(){
  18. parse_str($_GET['datastring'], $searcharray);
  19. echo $searcharray['date_of_birth'];
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement