Witam, mam taki oto skrypt autorstwa nijakiego Pakosa, działa on u mnie bez problemu na localhoście ale na serwerze nie działa, coś w kodzie do zmiany? nie mam pojęcia co jest siedze nad tym długo już.
Na serwerze po prostu jakby nie czytał hasła, wyskakuje złe hasło, gdy na localu jest wszystko ok przechodzi do strony dalej.
logged.php
<?php
include("goto.php");
if($_SESSION['kapass'] != "poprawne"){
goto("login.php");
}
?>
login.php
<?php
include("goto.php");
include("password.php");
if($_SESSION['kapass'] == "poprawne"){
goto($goodpassword);
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
<title>Logowanie</title>
<link rel="stylesheet" type="text/css" href="style/style.css" />
<?php
include("styles.inc.php");
?>
</head>
<body>
<center><br>
<a href=""><img border="0" src="img/inpero.png"></a><br><br>
<form action="logincheck.php" method="POST">
<table border="1">
<tr bgcolor="#aee440"><td><font class="text">Hasło:</font></td><td><input type="password" name="pass" class="textbox"></td></tr>
<tr bgcolor="#aee440"><td colspan="2" align="center"><input type="submit" value="Zaloguj"></td></tr>
</table>
</form>
<div class="stopka"></div>
<?php
if($_SESSION['kapass'] == "poprawne"){}
else{
echo $_SESSION['kapass']; }
?>
</center>
</body>
</html>
logincheck.php
require("goto.php");
include("password.php");
if($pass == $mainpassword){
$_SESSION['kapass'] = "poprawne";
goto($goodpassword);
}
else{
$_SESSION['kapass'] = "<font class=\"text\"><span style=\"color: red\"><b>Złe hasło</b></span></font>";
goto("login.php");
}
?>
password.php
<?php
//*** SWOJE HASŁO ZMIEŃ TUTAJ ($mainpassword="TWOJE_HASŁO";)
$mainpassword="ssss";
//*** JEŚLI HASŁO POPRAWNE GDZIE PRZEKIEROWAĆ? ($goodpassword="NAZWA_PLIKU.ROZSZERZENIE";)
$goodpassword="plik.php";
?>
goto.php
<?php
function goto($loc) {
}
?>
jeśli ktoś byłby w stanie w jakiś sposób pomóc, byłbym wdzięczny