Autor Zpráva
Mikeses
Profil *
<?PHP
$heslo=mysql_query("select password from redirect where user = '".$_COOKIE["nicknam"]."'");
while ($heslo1=MySQL_Fetch_Array($heslo)) {
if ($_POST['stareheslo'] != md5($heslo1['password']))
{
echo '
<div class="hlram">
<div class="hlpanel">
<font face="Verdana" color="#e7c37d"><small>
<img src="images/favicon.ico" width="16" height="16" border="0"> Změna hesla
</font></small></div>
<table cellspacing="0" cellpadding="0" style="border: 2x solid #e7c37d; background: #531C12;" valign="top" width="643" height="300">
<tr>
<td width="643" valign="middle" align="center">
<font face="Verdana" color="#e7c37d">
<center> <img src="images/error.gif" width="24" height="24" border="0"> Heslo se neshoduje
</font>
</td>
</tr>
</table>
</div>';
} else {
if (strlen($_POST['new1']) < 6)
{
echo '
<div class="hlram">
<div class="hlpanel">
<font face="Verdana" color="#e7c37d"><small>
<img src="images/favicon.ico" width="16" height="16" border="0"> Změna hesla
</font></small></div>
<table cellspacing="0" cellpadding="0" style="border: 2x solid #e7c37d; background: #531C12;" valign="top" width="643" height="300">
<tr>
<td width="643" valign="middle" align="center">
<font face="Verdana" color="#e7c37d">
<center> <img src="images/error.gif" width="24" height="24" border="0"> Minimálně 6 znaků
</font>
</td>
</tr>
</table>
</div>';
} else {
  $_POST['new1']=htmlspecialchars($_POST['new1']);
  $_POST['new2']=htmlspecialchars($_POST['new2']);
  if ($_POST['new1']!=$_POST['new2']) {
echo '
<div class="hlram">
<div class="hlpanel">
<font face="Verdana" color="#e7c37d"><small>
<img src="images/favicon.ico" width="16" height="16" border="0"> Změna hesla
</font></small></div>
<table cellspacing="0" cellpadding="0" style="border: 2x solid #e7c37d; background: #531C12;" valign="top" width="643" height="300">
<tr>
<td width="643" valign="middle" align="center">
<font face="Verdana" color="#e7c37d">
<center> <img src="images/error.gif" width="24" height="24" border="0"> Zadaná hesla si neodpovídají
</font>
</td>
</tr>
</table>
</div>';
  }
  else
  { 
$register=mysql_query("UPDATE redirect set password = '".md5($_POST["new1"]."' where user = '".$_COOKIE["nicknam"]."'")
if ($register)
    {
echo'
<div class="hlram">
<div class="hlpanel">
<font face="Verdana" color="#e7c37d"><small>
<img src="images/favicon.ico" width="16" height="16" border="0"> Změna hesla
</font></small></div>
<br>
';
      echo "<b><center>Změna hesla byla úspěšně provedena ".$_COOKIE['nicknam']." .</b><br />";
    }
      else {
echo'
<div class="hlram">
<div class="hlpanel">
<font face="Verdana" color="#e7c37d"><small>
<img src="images/favicon.ico" width="16" height="16" border="0"> Změna hesla
</font></small></div>
<br>
';
        echo "<b>Nastala Chyba. Zkus to znovu</b><br /></div>";
}  
}
}
}
else // uzavreni testu, zda je vse zadano
{
echo'
<div class="hlram">
<div class="hlpanel">
<font face="Verdana" color="#e7c37d"><small>
<img src="images/favicon.ico" width="16" height="16" border="0"> Změna hesla
</font></small></div>
<br>
';
  echo "<b>Musíš vyplnit všechny údaje</b><br /></div>";
}
}
?>


Moderátor Alphard: Titulek „agasdgsdagsdgsdgsdg“ nevystihuje podstatu dotazu. Příště zkus prosím vymyslet lepší.
Mikeses
Profil *
jaj sry za nazev ja to nechtel postnut ae kdyz uz chyba je
Parse error: syntax error, unexpected T_IF in /home/free/ic.cz/m/mikeses/root/www/inc/pwedit.inc on line 65
Enyeus
Profil
Na řádku 64 ti chybí středník.
loki
Profil *
OT: ten kod je riadna sialenost, skus sa pozastavit hlavne nad nim, pozri co su CSS a predovsetkym pomocou podmienky to vypisuj jednej tabulke nie v desiatich. Keby si mal takto robit dajme tomu nejaky redakcny system, tak by mal zdrojak 100 000 riadkov
loki
Profil *
dik Enyeus, som lenivy googlit :-/
Mikeses
Profil *
ten kod je pekny.... a je tam vice chyb :-)

Vaše odpověď

Mohlo by se hodit


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm:

0