jQuery - Pass variable to PHP script -


i have following jquery:-

jquery('.fancymember').on('click', function() {     var member = jquery(this).parent('div').parent('div').find('.test').val();     $.ajax({       type: "post",       url: "/get-to-know-us/",       data: "member="+member,       datatype: 'text',       success:function(event){          alert(member);       }     });  }); 

i want pass value of 'member' php script. if following in php file:-

<?php $test = $_post['member']; var_dump($test); ?> 

the value $test null, success function alerting correct value.

any ideas?


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -