Здравейте. Имам един логин код за една страница, сесии, но не ми дава да се логвам, въпреки че пиша правилно зададените усер и парола?
Това ми е sessionformata:
А това ми е za login-a, сесията.
Това ми е sessionformata:
Код:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title> |Отаку България - Контролен панел| </title>
<link rel="icon" type="image/x-icon" href="http://otaku.bg/panel/img/Oz245Kl.png">
<link type="text/css" rel="stylesheet" href="style.css">
<style>
#all{
margin-top: 15%;
}
.textbox1 {
background: #3da1b8 url(http://otaku.bg/panel/img/2zhLUix.png) no-repeat 6px 6px;
height:40px;
width: 270px;
border-radius: 2em;
border: none;
color: #FFF;
padding-left: 3em;
outline: none;
box-shadow: 0 4px 6px -5px hsl(0, 0%, 40%), inset 0px 4px 6px -5px hsl(0, 0%, 2%)
}
.textbox2 {
background: #3da1b8 url(http://otaku.bg/panel/img/1gYrtOg.png) no-repeat 6px 6px;
height:40px;
width: 270px;
border-radius: 2em;
border: none;
color: #FFF;
padding-left: 3em;
outline: none;
box-shadow: 0 4px 6px -5px hsl(0, 0%, 40%), inset 0px 4px 6px -5px hsl(0, 0%, 2%)
}
.button {
background-color:#3da2b8;
-webkit-border-radius:13px;
-moz-border-radius:13px;
border-radius:13px;
border:1px solid #648cb3;
color:#ffffff;
font: Arial;
font-size: 19px;
height:40px;
width:150px;
text-decoration:none;
text-align:center;
box-shadow: 0 4px 6px -5px hsl(0, 0%, 40%), inset 0px 4px 6px -5px hsl(0, 0%, 2%)
}
</style>
</head>
<body>
<center>
<font color="white">
<img src="http://otaku.bg/panel/img/l2PqGpz.png" /><br />
<FORM ACTION="sessionstart.php" METHOD=POST>
<INPUT TYPE="text" class="textbox1" NAME="potrebitel" value=""><br> <br>
<INPUT TYPE="password" class="textbox2" NAME="pas"><br> <br>
<INPUT TYPE=submit class="button"VALUE="Вход">
</font>
</center>
</body>
</html>
А това ми е za login-a, сесията.
Код:
<?
session_start();
?>
<html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title> |Отаку България - Контролен панел| </title>
<link rel="icon" type="image/x-icon" href="http://otaku.bg/panel/img/Oz245Kl.png">
<link type="text/css" rel="stylesheet" href="style.css">
</head>
<body>
<?
$potrebitel= $HTTP_POST_VARS['potrebitel'];
$pas= $HTTP_POST_VARS['pas'];
if ($potrebitel!='admin' || $pas!='admin90')
{
echo "<center><br><img src='http://otaku.bg/panel/img/TLpkAy1.png?1'><br><p style='font-size: 24px; color: red;'>Грешна информация!</style></center>";
}
else
{
$HTTP_SESSION_VARS['potrebitel']= $potrebitel;
echo "<meta http-equiv='refresh' url=http://www.otaku.bg/panel/index.php' />
<center><br><img src='http://otaku.bg/panel/img/aB1umRt.png?1'><br><p style='font-size: 24px; color: red;'>Успешно влизане в системата!</style><br><a href='http://www.otaku.bg/panel/index.php' style='font-size: 18px;'>Към контролния панел</a></center>";
}
?>
</body>
</html>