Categories
Randomizers

Yes or No Generator

Simple presentation of php random function – yes-or-no.goodplace.eu

Page is refreshed after click on the Button. Picture YES  or NO is loaded according to results of random function.

How its made
Code:
...
<input type="button" value="Yes or No ?" onClick="window.location.reload()">
...
<?php
if (rand(0,1) == 0) {
echo "<img src=\"no.jpg\" alt=\"no\" title=\"no\" border=\"0\" height=\"40\" width=\"80\">";
}
else {
echo "<img src=\"yes.jpg\" alt=\"yes\" title=\"yes\" border=\"0\" height=\"40\" width=\"80\">";
}
?>

Czech version ano-nebo-ne.goodplace.eu 
German version ja-oder-nein.goodplace.eu 
Spanish version si-o-no.goodplace.eu 
French version oui-ou-non.goodplace.eu 
Portugal version sim-ou-nao.goodplace.eu 
Russian version da-ili-net.goodplace.eu 
Slovak version ano-alebo-nie.goodplace.eu