• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 96
  • Last Modified:

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.

            if ($(this).prop("checked")){
            <?php $_SESSION['queryselected'] = 'acutenoncustomer';      ?>
1 Solution
Dave BaldwinFixer of ProblemsCommented:
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.
Ray PaseurCommented:
If you're new to PHP and want some learning resources, this article may be able to help.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now