pasanewa Posted April 5, 2007 Share Posted April 5, 2007 I have a Javascript function. I have a checkbox whose value has to be passed to PHP page if it is checked. that is if checkbox.checked = true.. I did=> var showlabel; if(chkbox6.checked==true) { showlabel.push(chkbox6.value); } request.open("GET","DrawMap.php?&chklabel="+showlabel,true); THEN AT THE PHP page DrawMap.php, i did like this=> $labelchk=$_GET['chklabel'].value; BUT $labelchk is NULL... WHY is it so ??? HELP plz.. Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted April 5, 2007 Share Posted April 5, 2007 The problem is probably that your the expression inside your if construct evaluates to false. Put an alert() inside it to see if it evaluates to true or false. Quote Link to comment Share on other sites More sharing options...
nogray Posted April 5, 2007 Share Posted April 5, 2007 $labelchk=$_GET['chklabel'].value; PHP doesn't have a value attribute on the variable, should be $labelchk=$_GET['chklabel']; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.