Advertisement
Guest User

Untitled

a guest
Apr 26th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. <html>
  2. <head>
  3. <meta charset="UTF-8">
  4. <title>Miksy</title>
  5. </head>
  6. <body>
  7. <form action="mix.php" method="get" enctype="multipart/form-data">
  8. <select name="sub1">
  9. <?php
  10. $tab = array ("MDMA","Amfetamina","Marihuana","Mefedron");
  11. for ($i=0;$i < count($tab);$i++)
  12. echo "<option>$tab[$i]<option>";
  13. ?>
  14. </select>
  15. <select name="sub2">
  16. <?php
  17. for ($i=0;$i < count($tab);$i++)
  18. echo "<option>$tab[$i]<option>";
  19. ?>
  20. </select>
  21. <input type="submit" value="miksuj"/>
  22. </form>
  23. <?php
  24. if (isset($_GET['sub1'])&&isset($_GET['sub2']))
  25. {
  26. $substancje1 = $_GET['sub1'];
  27. $substancje2 = $_GET['sub2'];
  28. if ($substancje1==$substancje2)
  29. {
  30. echo 'wybierz 2 różne substancje';
  31. }
  32. else{
  33. if(is_file ($substancje1."-".$substancje2.".php"))
  34. {
  35. echo "<h2>$substancje1 i $substancje2</h2>";
  36. include ($substancje1."-".$substancje2.".php");
  37. }
  38. else
  39. {
  40. echo 'nie ma takiej strony';
  41. }}
  42.  
  43. }
  44.  
  45. ?>
  46.  
  47. </body>
  48. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement