Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="küsimus"><h2><p align="center">Kui suur oli Eesti Vabariigi eelarve aastal 2010?</p></h2>
- <?php
- $p = $_GET['leht'];
- if($p == "") {
- echo '<form action="?leht=vastus" method="POST">
- <p align="center">
- <label>
- <input type="radio" name="kusimus" value="Radio1" />
- Radio1</label>
- <label>
- <input type="radio" name="kusimus" value="Radio2"/>
- Radio2</label>
- <br />
- <label>
- <input type="radio" name="kusimus" value="Radio3" />
- Radio3</label>
- <label>
- <input type="radio" name="kusimus" value="Radio4" />
- Radio4</label>
- <br />
- <input type="submit" name="vasta" value="Vasta" />
- </p>
- </form>';
- }
- if($p == "vastus") {
- $kusimus = $_POST['kusimus'];
- if($kusimus == "Radio2"){
- echo '<center>Vastasid küsimusele õieti!</center>';
- }
- if($kusimus == "Radio1"){
- echo '<center>Vastasid küsimusele valesti!</center>';
- }
- if($kusimus == "Radio3"){
- echo '<center>Vastasid küsimusele valesti!</center>';
- }
- if($kusimus == "Radio4"){
- echo '<center>Vastasid küsimusele valesti!</center>';
- }
- if($kusimus == ""){
- echo '<center>Palun vali vastus!</center>';
- }
- }
- ?>
- </div>
Add Comment
Please, Sign In to add comment