Суть проблемы. после авторизации пользователя он попадает на страницу auth.php. там есть меню. заходит в 1 с пунктов меню, после того как возвращается назад (стрелочкой назад в браузере или по нажатии на лого "Банк-Клиент" все падает.. и нужно снова отправлять запрос.
Ссылка на сайт: тыц
log: test
pass: test
Код index
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<meta http-equiv="cache-control" content="max-age=200" />
<link href="style.css" media="handheld, screen" rel="stylesheet" type="text/css" />
<title>Bank Client</title>
</head>
<body>
<div class="mainwrapper">
<div id="header">
<div class="right-bg">
<div id="logo">
<center><img height="50" width="270" alt="logo" src="images/logo.png" /></center>
</div>
<div id="inputsys" align="center">Вход в систему</div>
</div>
</div>
</div>
<div id="content">
<div class="min-width">
<ul id="navmenu">
<div class="autorization" >
<div class="autorization_text">
<form id="autorization_form" action ="auth.php" method = "POST" >
<form action="<?php echo $_SERVER['REQUEST_URI']; ?>" >
<label for = "name">Логин</label> </br>
<input type = "text" required name = "name" class="login-field" id = "name" /> </br>
<label for = "pass">Пароль</label> </br>
<input type = "password" required name = "pass" class="pas-field" id = "pass" />
</div>
<br />
<input type = "submit" id = "submit" name = "submit" class="autoriz-button" value="Вход" />
</form>
</div>
</ul>
</div>
</div>
<div id="footer">
<center> Kaplia V.V. © 2014 </center>
</div>
</div>
</body>
</html>
код auth.php
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<link href="style.css" media="handheld, screen" rel="stylesheet" type="text/css" />
<meta http-equiv="cache-control" content="max-age=200" />
<title>Добро пожаловать</title>
<div class="mainwrapper">
<div id="header">
<div class="right-bg">
<div id="logo">
<center> <a href="http://sql-chiibip.rhcloud.com/mobile/site/"><img height="50" width="270" alt="logo" src="images/logo.png"/> </a></ center>
</div>
</div>
</div>
</div>
<div id="content">
<div class="min-width">
<ul id="navmenu">
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
include "config.php";
session_start();
$db_table_to_show = 'Client';
$user_name = $_POST['name'];
if (isset($_POST['exit_btn'])){
$_SESSION['name'] = "";
unset($_SESSION);
header("Location: http://sql-chiibip.rhcloud.com/mobile/site" );
}
if (($_POST['name']) && ($_POST['pass'])){
$query = "SELECT * FROM `users` WHERE `name` = '".$_POST['name']."' AND `password` = '".$_POST['pass']."' ";
$sql = sprintf($query,
mysql_real_escape_string($_POST['name']='%s' && '%d'),
mysql_real_escape_string($_POST['pass']='%s' && '%d'));
$res = mysql_query ($query);
$row = mysql_fetch_array ($res);
if (($_POST['name'] == $row['name']) && ($_POST['pass'] == $row ['password'])){
$_SESSION['name'] = $_POST['name'];
$_SESSION['pass'] = $_POST['pass'];
mysql_query('SET NAMES `utf8`');
$_SESSION['uid'] = $row['id'];
$result = mysql_query( "SELECT * FROM `users` WHERE `name`='$user_name'");
$row = mysql_fetch_array($result);
echo '<html>';
echo "Здравствуйте, ".$row["FIO"];
echo '</br>';
echo '</br>';
echo'<html>';
echo '<li> <a href="http://sql-chiibip.rhcloud.com/mobile/site/add_new_client.html">Добавлен ие нового клиента</a></li>';
echo '<li> <a href="http://sql-chiibip.rhcloud.com/mobile/site/search.php">Поиск клиента</a></li>';
echo '<li> <a href="http://sql-chiibip.rhcloud.com/mobile/site/calc.php">Кредитный калькулятор </a></li>';
echo '<li> <a href="http://sql-chiibip.rhcloud.com/mobile/site/your_personal_page.php">Ваша персональная страница </a></li>';
} else { echo "Неверно указано имя пользователя или пароль. Повторите попытку ешё раз."; };
}
?>
</br><div class="exit" align="center" >
<form id="exit_form", action ="auth.php", method = "POST" >
<label for = "Выход"> </label>
<input type="submit" class="autoriz-button" value="Выход" name="exit_btn">
</form>
</br>
</div>
</div>
</div>
</head>
</html>
<div id="footer">
<center> Kaplia V.V. © 2014 </center>
</div>
Как можно исправить?...
_____________
« Бессмысленно продолжать делать то же самое и ждать других результатов. »