php - $_GET method is not set even after passing a query string -


this jquery code:

<script type = "text/javascript">     $('document').ready(function(){         $('#mybutton').click(function(){             var querystring = $('frmemployee').serialize();             $.ajax({                 url: 'anotherphp.php',                 type: 'get',                 data: querystring,                 success: function(){                     alert('success!');                 }             });         });     }); </script> 

after clicking mybutton, expect php code execute.

<?php     require_once('db_connect.php');     if(isset($_get['f_name'])){         $f_name = $_get['f_name'];         $m_name = $_get['m_name'];         $l_name = $_get['l_name'];          mysql_query("insert tbl_employee (f_name, m_name, l_name) values('$f_name','$m_name','$l_name')");     } ?> 

my problem of $_get functions seems empty. can see address bar of data have passed (using serialize() method). why?

i see serialize $('frmemployee'). need $('.frmemployee') when class , $('#frmemployee') when id.

propably sending empty query string now.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -