Solved

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.

Posted on 2015-02-17
2
77 Views
Last Modified: 2015-02-25
PHP ignores change and check box and runs all the time.

$("#cbType3").change(function(){
            if ($(this).prop("checked")){
            <?php $_SESSION['queryselected'] = 'acutenoncustomer';      ?>
            }else{
            }
});
0
Comment
Question by:TimothyPowell
2 Comments
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 40613857
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.
0
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 40613922
If you're new to PHP and want some learning resources, this article may be able to help.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_11769-And-by-the-way-I-am-new-to-PHP.html
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
These days socially coordinated efforts have turned into a critical requirement for enterprises.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now