Неможеш да се логнеш ..

justspy

Registered
Значи в сайта ми неможеш да си влезеш в акаунта освен ако не влезеш с mozzila тоест под IE, Opera нестава .. ето login.php


<?

// allows you to use cookies.
include("config.php");
if (!$logged[username])
{
if (!$_POST[login])
{
echo("
<center><form method=\"POST\">
<table>
<tr>
<td align=\"left\">
<input type=\"text\" class = 'user' value = 'Потребител' size=\"20\" maxlength=\"25\" name=\"username\">
</td>
</tr>
<tr>
<td align=\"left\">
<input type=\"password\" class = 'pass' value = 'password' size=\"20\" maxlength=\"25\" name=\"password\">
</td></tr><tr>
<td align=\"center\">
<input type=\"image\" src='images/vhod.png' name=\"login\" value=\"Влез\">
</td></tr><tr>
<td align=\"center\">
<a href=\"register.php\"><strong>Регистрирай се</strong></a>
</td></tr></table></form></center>");
}
if ($_POST[login]) {
// the form has been submitted. We continue...
$username=$_POST['username'];
$password = md5($_POST[password]);
// the above lines set variables with the submitted information.
$info = mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error());
$data = mysql_fetch_array($info);
if($data[password] != $password) {
// the password was not the user's password!
echo "Грешен потребител или парола!";
}else{
// the password was right!
$query = mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error());
$user = mysql_fetch_array($query);
// gets the user's information
setcookie("id", $user[id],time()+(60*60*24*5), "/", "");
setcookie("pass", $user[password],time()+(60*60*24*5), "/", "");
// the above lines set 2 cookies. 1 with the user's id and another with his/her password.
echo ("<meta http-equiv=\"Refresh\" content=\"10; URL=http://localhost/hit4e/\"/>Вие успешно влязохте в акаунта си.");
// modify the above line...add in your site url instead of yoursite.com
}
}
}
else
{
// we now display the user controls.




$date = date("d.m.Y");
echo "<center>Днес е $date</center>";
echo "<center>";





$query1 = mysql_query("SELECT COUNT(*) FROM `songs` WHERE `author`='$logged[username]'") or die(mysql_error());
$row = mysql_fetch_array($query1);
$count1 = $row["COUNT(*)"];



if ($logged[username]=="admin") {
echo "Ранг : <font color = 'red' /><b>Администратор</b></font><br /> ";
}
elseif ($count1 < 20 ) {
echo "Ранг : <font color = 'orange' /><b>Новак</b></font><br />";
} elseif($count1 >= 20 || $count1 <100){
echo "Ранг : <font color = '#ffab79' /><b>Потребител</b></font><br />";
} elseif($count1>=100 || $count1<200){
echo "Ранг : <font color = '#ff6600' /><b>Редовен</b></font><br />";
} elseif($count1>=200 || $count1<500){
echo "Ранг : <font color = '#60aa00' /><b>Музикален фен</b></font><br />";
}


echo "";







$query = mysql_query("SELECT COUNT(*) FROM `songs` WHERE `author`='$logged[username]'") or die(mysql_error());
$row = mysql_fetch_array($query);
$count = $row["COUNT(*)"];
print "<b>$logged[username]</b> - добавил <b><font color = 'orange' /><a href = 'songsa.php?username=$logged[username]' /><strong><font color='#000' />$count</font></strong></a></font></b> песни <br /> ";

$query = mysql_query("SELECT COUNT(*) FROM `news` WHERE `awtor`='$logged[username]'") or die(mysql_error());
$row = mysql_fetch_array($query);
$count = $row["COUNT(*)"];
print "<b>$logged[username]</b> - добавил <b><font color = 'orange' /><a href = 'newsa.php?username=$logged[username]' /><strong><font color='#000' />$count</font></strong></a></font></b> новини <br />";

$query = mysql_query("SELECT COUNT(*) FROM `pozdravi` WHERE `ot`='$logged[username]'") or die(mysql_error());
$row = mysql_fetch_array($query);
$count = $row["COUNT(*)"];
print "<b>$logged[username]</b> - добавил <b><font color = 'orange' /><strong><font color='#000' />$count</font></strong></font></b> поздрава <br /> ";


$query = mysql_query("SELECT COUNT(*) FROM `albums` WHERE `dobavil`='$logged[username]'") or die(mysql_error());
$row = mysql_fetch_array($query);
$count = $row["COUNT(*)"];
print "<b>$logged[username]</b> - добавил <b><font color = 'orange' /><a href = 'albumsa.php?username=$logged[username]' /><strong><font color='#000' />$count</font></strong></a></font></b> албума <br /> ";


$query = mysql_query("SELECT COUNT(*) FROM `lyrics` WHERE `dobavil`='$logged[username]'") or die(mysql_error());
$row = mysql_fetch_array($query);
$count = $row["COUNT(*)"];
print "<b>$logged[username]</b> - добавил <b><font color = 'orange' /><a href = 'lyricsa.php?username=$logged[username]' /><strong><font color='#000' />$count</font></strong></a></font></b> текста <br /> ";

echo ("<center>Добре дошли <b>$logged[username] <br /><br /></center>
</b>

<p>--------------------------------</p>
<img src = 'onMouseOut='nd()'><center><img border='0' width='150px' height='150px' src= '$logged[avatar]'
<p>--------------------------------</p>
<img src = \"images/addsong.png\"> <a href=\"addsong.php\"><font color = '#000' />Добави песен</a></font><br />
<img src = \"images/chart.gif\"> <a href=\"addnews.php\"><font color = '#000' />Добави новина</a><font><br />
<img src = \"images/addtext.png\"> <a href=\"addtext.php\"><font color = '#000' />Добави текст</a></font><br />
<img src = \"images/addtext.png\"> <a href=\"addbgtext.php\"><font color = '#000' />Добави преведен текст</a></font><br />
<img src = \"images/album.gif\"> <a href=\"addalbum.php\"><font color = '#000' />Добави албум</a></font><br />
<img src = \"images/add.png\"> <a href=\"addpozdrav.php\"><font color = '#000' />Добави поздрав</a></font><br />
<img src = \"images/clips.png\"> <a href=\"add.php\"><font color = '#000' />Добави Клип</a></font><br />
<img src = \"images/change.png\"> <a href=\"editprofile.php\"><font color = '#000' />Промени профила си</a></font><br />
<img src = \"images/users.png\"> <a href=\"members.php\"><font color = '#000' />Потребители</a></font><br />
<img src = \"images/exit.gif\"> <a href=\"logout.php\"><font color = '#000' />Излез [$logged[username]]</a></font><br />");
}
if ($logged[username]=="admin")
{
echo '<img src = "images/smile.gif"><a href="admin2.php">Админ панел</a>';}
else {
echo " ";
}

?>
 
еми то не само при мен е така .. никой неможе да се логне .. освен ако не флезе с mozzila .. ако трябва и register.php ще дам .. невиждам смисал но .. моля ви се .. :shock:
 
.user {

background-color: #FFFFFF;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border: 1px solid #ECECEC;
padding: 7px;
color: #AEAEAE;
}


.pass {
background-color: #FFFFFF;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border: 1px solid #ECECEC;
padding: 7px;
color: #AEAEAE;
}
 
Оправих го ..... проблема беше в субмит бутончето.. само мозила не правеше грешки .. ето кодчето с което стана :

Код:
<input type=\"submit\" name=\"login\" class=\"btn\" value=\"Влез\">
 

Горе