Логин система в сайт - Каде ми и грешката

mizarck

Registered
Здравеите,
Ноправих си сайт след това се опитах да вкарам логин система но някаде греша
Моляа ви погледнете и ме кажете каде забога греша



Код:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<style type="text/css">

</style>
<script language="JavaScript" type="text/JavaScript">

</script>
<style type="text/css">

</style>
</head>

<body bgcolor="#262626" onLoad="MM_preloadImages('images/showshoutboxover.gif')">
<table width="407" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td><img src="images/tleftm.gif" width="225" height="43"></td>
          <td valign="top"><div align="center"><img src="images/topbaranimated.JPG" width="300" height="22"><br>
              <span class="style1">Добре Дошли в WorlD.info</span><br>          
          </div></td>
          <td><img src="images/tlrightm.gif" width="231" height="43"></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td width="172" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/bgleftnav.gif">
              <tr>
                <td><img src="images/menu.gif" width="172" height="45"></td>
              </tr>
            </table> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td background="images/nav1bg.gif" onMouseOver="this.className='over'" onMouseOut="this.className=''" height="19"><div align="center">
                  <table width="81%" border="0" align="right" cellpadding="0" cellspacing="0">
                    <tr>
                      <td height="13"><strong><font size="1"><a href="+">Начало</a></font></strong></td>
                    </tr>
                  </table>
                </div></td>
              </tr>
              <tr>
                <td background="images/nav1bg.gif" onMouseOver="this.className='over'" onMouseOut="this.className=''" height="19"><div align="center">
                  <table width="81%" border="0" align="right" cellpadding="0" cellspacing="0">
                    <tr>
                      <td height="13"><strong><font size="1"><a href="+">Форум</a></font></strong></td>
                      </tr>
                  </table>
                </div></td>
              </tr>
              <tr>
                <td background="images/nav1bg.gif" onMouseOver="this.className='over'" onMouseOut="this.className=''" height="19"><div align="center">
                  <table width="81%" border="0" align="right" cellpadding="0" cellspacing="0">
                    <tr>
                      <td height="13"><strong><font size="1"><a href="+">Галерия</a></font></strong></td>
                      </tr>
                  </table>
                </div></td>
              </tr>
              <tr>
                <td background="images/nav1bg.gif" onMouseOver="this.className='over'" onMouseOut="this.className=''" height="19"><div align="center">
                  <table width="81%" border="0" align="right" cellpadding="0" cellspacing="0">
                      <tr>
                        <td height="13"><strong><font size="1"><a href="+">3D Свият </a></font></strong></td>
                      </tr>
                                  </table>
                </div></td>
              </tr>
              <tr>
                <td background="images/nav1bg.gif" onMouseOver="this.className='over'" onMouseOut="this.className=''" height="19"><div align="center">
                  <table width="81%" border="0" align="right" cellpadding="0" cellspacing="0">
                      <tr>
                        <td height="13"><strong><font size="1"><a href="+">PHP Свият </a></font></strong></td>
                      </tr>
                                  </table>
                </div></td>
              </tr>
              <tr>
                <td background="images/nav1bg.gif" onMouseOver="this.className='over'" onMouseOut="this.className=''" height="19"><div align="center">
                  <table width="81%" border="0" align="right" cellpadding="0" cellspacing="0">
                      <tr>
                        <td height="13"><strong><font size="1"><a href="+">Java Script Свият  </a></font></strong></td>
                      </tr>
                                  </table>
                </div></td>
              </tr>
              <tr>
                <td background="images/nav1bg.gif" onMouseOver="this.className='over'" onMouseOut="this.className=''" height="19"><div align="center">
                  <table width="81%" border="0" align="right" cellpadding="0" cellspacing="0">
                      <tr>
                        <td height="13"><strong><font size="1"><a href="+">CSS Свият </a></font></strong></td>
                      </tr>
                                  </table>
                </div></td>
              </tr>
              <tr>
                <td background="images/nav1bg.gif" onMouseOver="this.className='over'" onMouseOut="this.className=''" height="19"><div align="center">
                  <table width="81%" border="0" align="right" cellpadding="0" cellspacing="0">
                      <tr>
                        <td height="13"><strong><font size="1"><a href="+">PHPBB Свият </a></font></strong></td>
                      </tr>
                                  </table>
                </div></td>
              </tr>
              <tr>
                <td background="images/nav1bg.gif" onMouseOver="this.className='over'" onMouseOut="this.className=''" height="19"><div align="center">
                  <table width="81%" border="0" align="right" cellpadding="0" cellspacing="0">
                      <tr>
                        <td height="13"><strong><font size="1"><a href="+">Потребители</a></font></strong></td>
                      </tr>
                                  </table>
                </div></td>
              </tr>
              <tr>
                <td background="images/nav1bg.gif" onMouseOver="this.className='over'" onMouseOut="this.className=''" height="19"><div align="center">
                  <table width="81%" border="0" align="right" cellpadding="0" cellspacing="0">
                      <tr>
                        <td height="13"><strong><font size="1"><a href="+">За Контокти </a></font></strong></td>
                      </tr>
                                  </table>
                </div></td>
              </tr>
              <tr>
                <td background="images/nav1bg.gif" onMouseOver="this.className='over'" onMouseOut="this.className=''" height="19"><div align="center">
                  <table width="81%" border="0" align="right" cellpadding="0" cellspacing="0">
                      <tr>
                        <td height="13"><strong><font size="1"><a href="+">За нас </a></font></strong></td>
                      </tr>
                                  </table>
                </div></td>
              </tr>
              <tr>
                <td background="images/nav1bg.gif" onMouseOver="this.className='over'" onMouseOut="this.className=''" height="19"><div align="center">
                  <table width="81%" border="0" align="right" cellpadding="0" cellspacing="0">
                      <tr>
                        <td height="13"><strong><font size="1"><a href="+">Вход</a></font></strong></td>
                      </tr>
                                  </table>
                </div></td>
              </tr>
              <tr>
                <td background="images/nav1bg.gif" onMouseOver="this.className='over'" onMouseOut="this.className=''" height="19"><div align="center">
                  <table width="81%" border="0" align="right" cellpadding="0" cellspacing="0">
                      <tr>
                        <td height="13"><strong><font size="1"><a href="+">Регистрация</a></font></strong></td>
                      </tr>
                                  </table>
                </div></td>
              </tr>
              <tr>
                <td background="images/nav1bg.gif" onMouseOver="this.className='over'" onMouseOut="this.className=''" height="19"><div align="center">
                  <table width="81%" border="0" align="right" cellpadding="0" cellspacing="0">
                      <tr>
                        <td height="13"><strong><font size="1"><a href="+">Забравена Парола </a></font></strong></td>
                      </tr>
                                  </table>
                </div></td>
              </tr>
              <tr>
                <td background="images/nav1bg.gif" onMouseOver="this.className='over'" onMouseOut="this.className=''" height="19"><div align="center">
                  <table width="81%" border="0" align="right" cellpadding="0" cellspacing="0">
                      <tr>
                        <td height="13"><strong><font size="1"><a href="+">Анкети</a></font></strong></td>
                      </tr>
                                  </table>
                </div></td>
              </tr>
            </table>
            <table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/bgleftnav.gif">
              <tr> 
                <td><img src="images/login.gif" width="172" height="45"></td>
              </tr>
              <tr> 
                <td><table width="90%" border="0" align="right" cellpadding="0" cellspacing="0">
                  <tr>
                    <td>
					<script type="text/javascript"> 
 
</script> 
</head> 
<body> 
<form name="login" method="post"  onsubmit="return validate()">
  <table width="1%" border="0"> 
  <tr> 
    <td><input  name="potrebitel" type="text" onFocus="doClear(this)"  value="Име"></td> 
    </tr> 
  <tr> 
    <td><input  name="parola" type="password" onFocus="doClear(this)"  value="Парола"></td> 
    </tr> 
  <tr align="center"> 
    <td><input type="submit" name="Submit" value="Вход"></td> 
  </tr> 
</table> 
</form> </td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
          <td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/mcbg.gif">
              <tr>
                <td><img src="images/maincontent.gif" width="584" height="45"></td>
              </tr>
              <tr>
                <td><table width="100%" height="100%">
                  <tr>
                    <th scope="row"
					
					<? 
$potrebitel=$HTTP_POST_VARS['potrebitel']; 
$parola=$HTTP_POST_VARS['parola']; 


$user=".........."; 
$password="................"; 
$database=".................."; 

mysql_connect(localhost,$user,$password); 
mysql_select_db($database) or die( "Unable to select database"); 
$query="SELECT * from phpbb_users 
where username like '$potrebitel' and user_password like md5('$parola') "; 
$result=mysql_query($query); 
mysql_close(); 
if (mysql_num_rows($result) >0 ) 
  { 
  
    echo "Добър ден ".$potrebitel.".Вие се логнахте успешно"; 

    } 
else 
{ 
echo "Грешен user или pass."; 
} 
?></th>
                  </tr>
                  
                </table></td>
              </tr>
              <tr>
                <td><div align="center"><img src="images/copyright_do_not_remove.gif" width="584" height="44" border="0"></div></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
</body>
</html>

Благодаря предварително
 

nvidia

Registered
Дай грешката де. :)

Без грешката трудно ще намеря проблема.

Виж и това:
Код:
<form name="login" method="post"  onsubmit="return validate()">

няма action


Трябва да бъде нещо от сорта на:
<form name="login" method="post" action = "пътя до файла" onsubmit="return validate()">

Тъй като пращаш на същия файл просто напиши името му.

Не виждам някаква по особенна грешка!

Искам да покажеш какво ти показва.
Този скрипт за логване работи сбазата данни на форума ти phpBB нали?
Имаш ли регистрирани потребители в този форум?

Абе дай грешката да я видиме и ще стане ясно какво става. :wink:
 

mizarck

Registered
nvidia каза:
Дай грешката де. :)

Без грешката трудно ще намеря проблема.

Виж и това:
Код:
<form name="login" method="post"  onsubmit="return validate()">

няма action


Трябва да бъде нещо от сорта на:
<form name="login" method="post" action = "пътя до файла" onsubmit="return validate()">

Тъй като пращаш на същия файл просто напиши името му.

Там е работата вообще никаква грешка недава и не лагва дори <form name="login" method="post" action = "index.php" onsubmit="return validate()"> като е и нз защо
 

nvidia

Registered
mizarck каза:
<form name="login" method="post" action = "index.php" onsubmit="return validate()">

Махни за момент това onsubmit="return validate()"
да видиме какво ще стане!
Така ще се разбере дали не е заради javascript-a .
 

nvidia

Registered
Намерих я :) .


Код:
            <td><table width="100%" height="100%"> 
                  <tr> 
                    <th scope="row"

трябва да е


Код:
            <td><table width="100%" height="100%"> 
                  <tr> 
                    <th scope="row" >

Забравил си да затвориш скобата накрая и не ти се вижда echo-то.
 

mizarck

Registered
Много ти благодаря пич щот вече сигорно има 10 часа от как съм почнал да я търса тази грешка
Жив и Здрав да си много ти благодаря
 

nvidia

Registered
След някой друг месец ще видиш как ще свикнеш да ги намираш.
И аз така съм търсил 100 часа.
Гадна работа. :eek: :)
 

Горе