У меня здесь выходят первая строка в таблицы..
Код: Выделить всё
<?php
session_start();
$error = isset($_SESSION['error']) ? $_SESSION['error'] . '
' : '';
unset($_SESSION['error']);
if (isset($_SESSION['user'])) {
$auth .= "<a href='logout.php'>Выйти</a>
";
mysql_connect("localhost", "wmggfg_666","666");
mysql_select_db("wmggfg_666");
$ath = mysql_query("select * from users;");
if($ath)
{
$author = mysql_fetch_array($ath);
echo "
Фамилия = ".$author['fam']."
";
echo "Имя = ".$author['imia']."
";
echo "E-mail = ".$author['mail']."
";
}
$docum = "Эта информация только для зарегистрированных";
}else {
$auth = <<< AUTH
<form method="post" action="login.php">
<table align="center">
<tr>
<td>E-mail</td>
<td><input type="text" name="mail"></td>
</tr>
<tr>
<td>Пароль</td>
<td><input type="password" name="par"></td>
</tr>
<tr>
<td><input type="submit" name="submit" value="Войти"></td>
</tr>
</table>
</form>
AUTH;
}
?>