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.. Link to comment https://forums.phpfreaks.com/topic/45696-pass-value/ 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. Link to comment https://forums.phpfreaks.com/topic/45696-pass-value/#findComment-222099 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']; Link to comment https://forums.phpfreaks.com/topic/45696-pass-value/#findComment-222366 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.