Защо става така?

hishnika

Registered
Значи ползвам следния код (той е за логин от сайт и последните десет мнения)
Ето кога:
Код:
<p><? 
define('IN_PHPBB', true); 
$phpbb_root_path ='phpBB2/'; 
include($phpbb_root_path . 'config.php'); 
include($phpbb_root_path . 'extension.inc'); 
include($phpbb_root_path . 'common.'.$phpEx); 
$userdata = session_pagestart($user_ip, PAGE_INDEX); 
?>
<? 
if ($userdata['user_active']>0) 
{ 

echo ' 
 
<table border="0" style="font-size:12px;" cellpadding="0" cellspacing="0" > 
<tr> 
</td> 
</tr> 
<tr> 
<td style="font-size:13px;" height="20">Потребител: 
<td style="font-size:12px;" height="20"><a 
href="'.$phpbb_root_path.'profile.php?mode=viewprofile&u='.$userdata['username'].' ">'. $userdata['username'].'</a> 
</td> 
</tr> 
<tr> 
<td style="font-size:13px;" height="20">Опции:
<td height="20" ><a class="user" href="'.$phpbb_root_path.'login.php?logout=true&sid='.$userdata['session_id'].'">Изход</a></td>
</tr> 
<tr> 
<td height="5"> 
</td> 
</tr> 
<tr> 
<td style="font-size:13px; style="font:Arial;" height="20">Мнениа:
<td style="font-size:12px;" height="20"><a 
href="'.$phpbb_root_path.'profile.php?mode=viewprofile&u='.$userdata['user_posts'].' ">'. $userdata['user_posts'].'</a>
<td style="font-size:15px" height="20">
</td> 
</tr>
</table> 
 
'; 
} 
else 
{ 

echo ' 
 
<form action="'.$phpbb_root_path.'login.php" method="post" style="margin: 0px;"> 
<input type="hidden" name="redirect" value="../index.php" /> 
<table border="0" style="font-size:12px;" width="130" cellspacing="0" cellpadding="0"> 
<tr> 
<td class="left" height="25"> 
<b>Потребител:</b> 
</td> 
</tr> 
<tr> 
<td class="left" height="25"> 
<input type="text" name="username" size="10" maxlength="25"> 
</td> 
</tr> 
<tr> 
<td class="left" height="25"> 
<b>Парола:</b> 
</td> 
</tr> 
<tr> 
<td class="left" height="25"> 
<input type="password" name="password" size="10" maxlength="25"> 
</td> 
</tr> 
<tr> 
<td> 
автоматично: <input type="checkbox" name="autologin" checked > 
</td> 
</tr> 
<tr> 
<td class="left" height="35"> 
<input type="submit" name="login" value="Вход"> 
</td> 
</tr> 
<tr> 
<td class="left" height="20" > 
<a href="'.$phpbb_root_path.'profile.php?mode=register">Регистрация</a> 
</td> 
</tr> 
<tr> 
<td class="left" height="20"> 
<a href="'.$phpbb_root_path.'profile.php?mode=sendpassword" >Забравена парола</a> 
</td> 
</tr>
 
<tr> 
<td style="font-size:12px;" height="20"><a 
href="'.$phpbb_root_path.'profile.php?mode=viewprofile&u='.$userdata['user_posts'].' ">'. $userdata['user_posts'].'</a>
Mnenia 
</td> 
</tr> 
</table> 
</form> 

'; 
}

$connection = mysql_connect("localhost", "root", ""); 
$db = mysql_select_db("phpbb", $connection); 

$query = mysql_query("select * from phpbb_topics order by topic_last_post_id desc limit 0,10"); 
while($rows = mysql_fetch_array($query)) 
{ 
print "<br>"; 
print "<font color=blue>-</font>"; 
$forum = $rwz[forum_name]; 
$catid = $rwz[cat_id]; 
$qry2 = mysql_query("select * from phpbb_categories where cat_id='$catid'"); 
$rwz2 = mysql_fetch_array($qry2); 
$cat = $rwz2[cat_title]; 
if (strlen($rows[topic_title])>1){ 
printf("<a href=\"phpBB2/viewtopic.php?t=%d\">%s %s</a> (%d)", $rows[topic_id], $cat, ((strlen($rows[topic_title])>42)?substr($rows[topic_title],0,42)."...": $rows[topic_title]), $rows[topic_replies]); 
} 
} 

?>
Защо като тръгна да ги слагам в таблици и сичко се бъгва.
Ако някой може ще го помоля да ги раздели и да даде кога, че при мен не става, или по точно аз на знам как става :?:
 
Кое искаш да сложиш в таблица, че нещо не разбрах. Демек логина да е в една таблица а темите в друга или?
 
Да това, аз немога да го направя, или правя го но след два три рефреша ми дава грешка и не иска да се оправи
 

Back
Горе