help: input form html, php

Discussion in 'Programming' started by ifnawi, Nov 11, 2013.

  1. #1
    hello everyone,

    i'd like to have help here with this form of exxercises in this website here

    www.englisch-hilfen.de/en/exercises/questions/simple_present.htm

    well in this form its seems like a code html but i don't know how it gets results and answers after clicking on checking button or show asnwers and this is the form

     
    ifnawi, Nov 11, 2013 IP
  2. senecacollege

    senecacollege Well-Known Member

    Messages:
    457
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    130
    #2
    use print_r($_POST), you can see all the input value after form submit, then validate each input value, if empty, then show sad icon beside that input field

    <?php
     
    if(isset($_POST['check_solutions'])){
     
    if(empty($_POST['solution1_1'])) $error='sad icon';
     
    if(empty($_POST['solution2_1'])) $error='sad icon';
     
    }
     
    ?>
    Code (markup):
     
    senecacollege, Nov 11, 2013 IP
  3. ifnawi

    ifnawi Member

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #3
    yes but the page there is html how did they could put php code into html source?
     
    ifnawi, Nov 11, 2013 IP