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
84 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 83

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 109

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Wordpress Security 29 48
Inserting data into database 10 35
Word, Excel, Access icons 4 17
$_SERVER Variable question 31 27
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn how to count occurrences of each item in an array.

856 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