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

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -