php issue??

Posted on 2011-10-24
Last Modified: 2012-05-12
See attached code. Note how one of the first things it does is gets the value of paybymail from the query string.

See attached image. This is the actual browser screen shot. Note there is NO query string. But the code behaves as if the variable paybymail is there & set to "on".

Question by:Richard Korts
    LVL 18

    Accepted Solution

    Try in lines 11-15:
    if ($_GET['paybymail'] == "on") {
    	$paybymail = 1;
    } else {
    	$paybymail = 0;

    Open in new window

    And in line 47:

    if ($paybymail==0) {

    Open in new window

    It might be that setting variable to "false" means for PHP that variable exists, meaning it is not FALSE.

    Author Closing Comment

    by:Richard Korts
    I'll be darned!. When I saw your solution, I thought, no way.

    But it worked.

    I am almost POSITIVE that I have used this technique in other places & that it worked.


    Featured Post

    Training Course: Java/J2EE and SOA

    This course will cover both core and advanced Java concepts like Database connectivity, Threads, Exception Handling, Collections, JSP, Servlets, XMLHandling, and more. You'll also learn various Java frameworks like Hibernate and Spring.

    Join & Write a Comment

    Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
    I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    728 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

    19 Experts available now in Live!

    Get 1:1 Help Now