Quick question

Discussion in 'PHP' started by Teessider_2000, Dec 8, 2006.

  1. #1
    Hi guys

    Since i am relatively new to php feel free to call me a fool!
    But is it possible to self submit a form using php-self, so the information (in this case lots of radio buttons) can be validated on the same page using php and then, if valid data, post the information to a different page?

    Im trying to resist the urge to use javascript!

    Cheers in advance

    Will
     
    Teessider_2000, Dec 8, 2006 IP
  2. papa_face

    papa_face Notable Member

    Messages:
    2,237
    Likes Received:
    67
    Best Answers:
    1
    Trophy Points:
    285
    #2
    Yes.
    
    if (isset($_POST["submit"]))
       {
       validation code goes here;
       }
    
    else
       {
      echo 'form html goes here';
      }
    
    
    
    Code (markup):
     
    papa_face, Dec 8, 2006 IP
  3. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #3
    You couldn't actually post the data ( well you could, but not easily ) but you can process whatever needs to be done on the same page and redirect the browser ot output instrcutions accordingly.
     
    krakjoe, Dec 8, 2006 IP