Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta charset="UTF-8">
- <title>Miksy</title>
- </head>
- <body>
- <form action="mix.php" method="get" enctype="multipart/form-data">
- <select name="sub1">
- <?php
- $tab = array ("MDMA","Amfetamina","Marihuana","Mefedron");
- for ($i=0;$i < count($tab);$i++)
- echo "<option>$tab[$i]<option>";
- ?>
- </select>
- <select name="sub2">
- <?php
- for ($i=0;$i < count($tab);$i++)
- echo "<option>$tab[$i]<option>";
- ?>
- </select>
- <input type="submit" value="miksuj"/>
- </form>
- <?php
- if (isset($_GET['sub1'])&&isset($_GET['sub2']))
- {
- $substancje1 = $_GET['sub1'];
- $substancje2 = $_GET['sub2'];
- if ($substancje1==$substancje2)
- {
- echo 'wybierz 2 różne substancje';
- }
- else{
- if(is_file ($substancje1."-".$substancje2.".php"))
- {
- echo "<h2>$substancje1 i $substancje2</h2>";
- include ($substancje1."-".$substancje2.".php");
- }
- else
- {
- echo 'nie ma takiej strony';
- }}
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement