strange issue when using radio buttons

Discussion in 'HTML & Website Design' started by falco85, Sep 27, 2006.

  1. #1
    Hi,
    I was tweaking a new script I purchased with my own options, and one of the additions was that I am now using a radio button instead of checkboxes (I'm talking about html forms) to get the value of a variable to be passed to a PHP script.

    I was using $_POST('VariableName') with checkboxes on the other page script and the information was passing correctly. Now with radio buttons the script is not working :mad: what is the difference?

    Thanks!
     
    falco85, Sep 27, 2006 IP
  2. penagate

    penagate Guest

    Messages:
    277
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi!

    I can't remember off the top of my head how radio buttons work.
    However, you can use var_dump to see what is being sent, and work from there.

    if (strtoupper($_SERVER['REQUEST_METHOD']) === 'POST') {
      header('Content-type: text/plain');
      var_dump($_POST);
      exit();
    }
    
    PHP:
    Regards
    - P
     
    penagate, Sep 27, 2006 IP