Jump to content

sora

New Members
  • Posts

    4
  • Joined

  • Last visited

sora's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. i really appreaciated ur help friend , its ok if you couldn't find the way, i appreciate ur help to me even all , thank you friend
  2. thank you friend for your ur help im appreciated it, wat i meant with the show answers button , is next the button check , wanna add another button funtions with answering the results of the test without take it, once u hit it , it takes u to result page shows rights answers , i hope you get my idea
  3. thats right brother thank you, it works well whats the javascript code i can put for show answers button without answering any of question , and as well the button of repeating after submission and thank you for your help
  4. hello, i know the title looks little bit strange but i have an issue with my php form , after i submit with empty input box i don't get the echo results as wanted in the code with unanswered mark , as well when put right answer it gives back blank page after submitting or just the sentence of you like lemon . one more thing how can i add the button of repeat the exercise after submitting so it gives the form again for do the exercise over again, and how as well the button of showing results without taking the exam , means press the show results button shows them directly and thank you all in advance this is my code <?php $solution="do"; $solution3="do1"; if (isset($_POST['solution1'])){ $solution1=$_POST['solution1']; if ($_POST['add']){ if ($solution1 != $solution){ echo '<span style="color: red;">'.$solution1.'</span> you like lemon?</br>'; } } else if ($solution1 = null) { echo '<span style="color: blue;">"unanswered"</span> you like lemon?</br>'; } else { echo '<span style="color: green;">'.$solution1.'</span> you like lemon?</br>'; } } if (isset($_POST['solution2'])){ $solution2=$_POST['solution2']; if ($_POST['add']){ if ($solution2 != $solution3){ echo '<span style="color: red;">'.$solution2.'</span> you like lemon?</br>' ; } } else if ($solution2 = null) { echo '<span style="color: blue;">"unanswered"</span> you like lemon?</br>'; } else { echo '<span style="color: green;">'.$solution2.'</span> you like lemon?</br>'; } } else { ?> <form method="post" autocomplete="off" > <input type="text" name="solution1" /> you like lemon? </br> <input type="text" name="solution2" /> you like apple? <input type="submit" name="add" value="Check" /> </form> <?php } ?> and thank you guys
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.