PHP ile Şifreli sayfa oluşturmak hiç bu kadar kolay olmamıştı alttaki kodları inceleyerek bilgi sahibi ola bilirsiniz.
NOT : ACIKLAMA SATIRLARI YANINDA YAZILI
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
|
<?php
@$do = $_GET['do'];
$sifre = "123456"; // Giriş Şifremiz
if($do != "login"){ // Anasayfa değil ise şifre bölümünü gösterecek
?>
<form id="form1" name="form1" method="post" action="index.php?do=login">
<table width="100%" border="0">
<tr>
<td><label>
<input type="text" name="pass" id="pass" />
<input type="submit" name="button" id="button" value="Giriş" />
</label></td>
</tr>
</table>
</form>
<?php
}else if($do == "login"){
@$pass = $_POST['pass'];
if($pass != $sifre){ //formdan gelen şifre $sifre değişkenine eşit değilse..
echo("Şifre Yanlış.!"); //bunu yazdıracak.
}else{ //eşitse
?>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.style1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
font-size: 60px;
color: #FFFFFF;
}
-->
</style></head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="160" bgcolor="#666666"><div align="center" class="style1">Savaş Can Altun</div></td>
</tr>
</table>
</body>
</html>
<?php
}
}
?>
|
Hiç yorum yok:
Yorum Gönder