Mam taki kod:
<?php
?>
<?php
$phpbb_root_path = 'forum/';
include( $phpbb_root_path . 'extension.inc' . $phpEx );
include( $phpbb_root_path . 'common.' . $phpEx );
$userdata = session_pagestart( $user_ip, PAGE_INDEX, $session_length );
init_userprefs( $userdata );
?>
<html>
<head>
</head>
<body>
<?php
include("forum/login.php");
if ( $userdata['session_logged_in'] )
{
$u_login_logout = 'forum/login.'.$phpEx.'?logout=true&sid=' . $userdata['session_id'];
$l_login_logout = $lang['Logout'] . ' [ ' . $userdata['username'] . ' ]';
echo "<a href='".$u_login_logout."'>".$l_login_logout."</a>";
}else{
?>
<form action="forum/login.php" method="post">
<table>
<tr>
<td>
<div class="login_text">LOGIN: </div>
</td>
<td>
<input type="text" name="username" size="15" maxlength="40" class="username">
</td>
<td>
<div class="login_text">HASŁO: </div>
</td>
<td>
</font><input type="password" name="password" size="15" maxlength="40" class="username">
</td>
<td>
</font><input type="submit" name="login" class="wyslij" value="ZALOGUJ">
</td>
</tr>
</table>
</form>
<?php
}
?>
<?php
if ( $userdata['session_logged_in'] ) {
echo 'Witaj '.$userdata['username'].''; }
else
{
echo 'Nie jestes zalogowany'; }
?>
</body>
</html>
Skopiowałem na żywca z neta aby to w ogole zadziałało ale nie chce działać sypie warningami. Wszystkie błędy są tutaj:
http://www.opowiesciznarnii.pl/logowanie_test.phpCo jest źle ?
Moje forum jest jako subdomena i znajduje się w katalogu
home/forum
a pliki są w katalogu home/
// EDYT
Rozwiązałem problem (IMG:
style_emoticons/default/smile.gif) heheheh.
Ten post edytował sakuwbarakushow 28.12.2013, 19:27:13