Link to home
Start Free TrialLog in
Avatar of TimothyPowell
TimothyPowell

asked on

I have an HTML check box legend that I need to convert to PHP, PHP does not recognize the checkboxes and fires all the time.

PHP ignores change and check box and runs all the time.

$("#cbType3").change(function(){
            if ($(this).prop("checked")){
            <?php $_SESSION['queryselected'] = 'acutenoncustomer';      ?>
            }else{
            }
});
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

In your code above, the PHP line will Always run because it is run on the server and the jQuery is run in the browser After the PHP code is run on the server.  While you can insert a value in a javascript with PHP, you can't do the other way around.
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial