12 lines
210 B
PHP
12 lines
210 B
PHP
<?php
|
|
|
|
if(isset($_POST['roll'])){
|
|
$rand = rand(1,6);
|
|
echo 'You rolled a ' .$rand;
|
|
}
|
|
|
|
?>
|
|
|
|
<form action="RandomGenerator.php" method="POST">
|
|
<input type="submit" name="roll" value="Roll dice">
|
|
</form>
|