<?php
if(isset($_POST['roll'])){
$rand = rand(000, 999);
echo 'You rolled a '.$rand.'.';
}
?>
<form action = "rand.php" method = "POST">
<input type = "submit" name = "roll" value = "Roll a Dice">
</form>

TNW provides the best ICT solutions for your business by the reasonable price.
TNW - ICT Solutions
Randomization in php
- Details
- Written by Thet Naing Win
- Category: php
- Hits: 395