[ Поиск ] - [ Пользователи ] - [ Календарь ]
Полная Версия: Включение (include) файла с помощью пароля
setr
Здравствуйте
Есть такой код. Все работало. С недавнего времени config.php включается при любом введенном пароле. Помогите найти ошибку.

index.php
<?php
session_start();
if (isset($_SESSION['u'])<>'12345')
{$g='img2.gif';
include "config2.php";}
else
{$g='img.gif';
include "config.php";}
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<
html>
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset=utf-8">
...
</
head>
<
body>
<
table>
<
td>
<
input type="image" src="<?php echo $g ?>" id="show-button">
<
div id="prompt-form-container">
<
form id="prompt-form" action="conf.php" method="POST">
<
div id="prompt-message"></div>
<
input name="module" type="text">
<
input type="submit" value="Ок">
<
input type="button" name="cancel" value="Отмена">
</
form>
</
div>

<
script>
...
</
script>

</
td>
</
table>
</
body>
</
html>


conf.php
<?PHP
session_start();
$_SESSION['u'] = $_POST['module'];
header("Location: index.php");
?>
Быстрый ответ:

 Графические смайлики |  Показывать подпись
Здесь расположена полная версия этой страницы.
Invision Power Board © 2001-2024 Invision Power Services, Inc.