here is the code.......here i am passing a javascript array to php... something is going wrong........
html:
<html>
<body onload="aa()" >
<script language="javascript">
function aa()
{
var a, s;
a = [ 'one', 'two', 'three'];
s = JSON.stringify( a );
document.getElementById("fb_user").innerHTML= s;
}
</script>
<form action="check1.php" method="post">
<label id="fb_user"> </label>
<input type="submit" value="submit"/>
</form>
</body>
</html>
php code:
<?php
$fb_usr_id =json_decode( $_POST['fb_user'], true );
echo $fb_usr_id;
?>
when $fb_usr_id is echoed nothing is printed??