Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
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
Medium Priority
?
90 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 84

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 111

Accepted Solution

by:
Ray Paseur earned 2000 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying 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

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
This article discusses how to implement server side field validation and display customized error messages to the client.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

705 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