Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- </head>
- <body>
- <?php
- $x = rand(100,300);
- $y = rand(100,300);
- $z = rand(1,4);
- echo '<a href = "index2.php?x='.$x.'&y='.$y.'&z='.$z.'">asd</a>';
- ?>
- </body>
- <html>
- __________________________________________________________
- <?php
- switch($_GET['z']){
- case 1:
- echo $_GET['x']+$_GET['y'];
- $_GET['z']='+';
- break;
- case 2:
- echo $_GET['x']-$_GET['y'];
- $_GET['z']='-';
- break;
- case 3:
- echo $_GET['x']/$_GET['y'];
- $_GET['z']='/';
- break;
- case 4:
- echo $_GET['x']*$_GET['y'];
- $_GET['z']='*';
- break;
- }
- echo "<br>";
- print_r($_GET);
- echo "<br><a href= index.php>back</a>";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement