-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInternetProgramciligi2SansOyunlari.php
96 lines (93 loc) · 2.17 KB
/
InternetProgramciligi2SansOyunlari.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
//Sayısal Loto
<?php
if(isset($_POST['submit'])){
$sayilar = array();
while (count($sayilar) < 6) {
$sayi = rand(1,34);
if (in_array($sayi,$sayilar) === FALSE) {
array_push($sayilar,$sayi);
}
}
array_multisort($sayilar,SORT_ASC);
}
?>
<html>
<head>
</head>
<body>
<form action="" method="POST">
<input type="submit" name="submit" value="Çekilişi Başlat">
</form>
<?php
if(isset($_POST['submit'])){for($i=0; $i < 6; $i++){
$j = $i+1;
echo "$j. Sayı = " . $sayilar[$i] . "<br>";
}
}?>
</body>
</html>
//Şans Topu
<?php
if(isset($_POST['submit'])){
$sayilar = array();
while (count($sayilar) < 6) {
$sayi = rand(1,34);
if (in_array($sayi,$sayilar) === FALSE) {
array_push($sayilar,$sayi);
}
}
array_multisort($sayilar,SORT_ASC);
$sayi2 = rand(1,14);
}
?>
<html>
<head>
</head>
<body>
<form action="" method="POST">
<input type="submit" name="submit" value="Şans Topunu Başlat">
</form>
<?php if(isset($_POST['submit'])){
for($i=0; $i < 6; $i++){
$j = $i+1;
echo "$j. Sayı = " . $sayilar[$i] . "<br>";
}
echo "Son Sayı = " . $sayi2;
}
?>
</body>
</html>
//Milli Piyango
<?php
if(isset($_POST['submit'])){
$sayilar = array();
$sayi1 = rand(0,5);
$sayi2 = rand(0,9);
$sayi3 = rand(0,9);
$sayi4 = rand(0,9);
$sayi5 = rand(5,9);
$sayi6 = rand(0,5);
array_push($sayilar, $sayi1);
array_push($sayilar, $sayi2);
array_push($sayilar, $sayi3);
array_push($sayilar, $sayi4);
array_push($sayilar, $sayi5);
array_push($sayilar, $sayi6);
}
?>
<html>
<head>
</head>
<body>
<form action="" method="POST">
<input type="submit" name="submit" value="Şans Topunu Başlat">
</form>
<?php if(isset($_POST['submit'])){
for($i=0; $i < 6; $i++){
$j = $i+1;
echo "$j. Sayı = " . $sayilar[$i] . "<br>";
}
}
?>
</body>
</html>