![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 12 Pomógł: 0 Dołączył: 10.03.2004 Ostrzeżenie: (0%) ![]() ![]() |
czy jest mozliwe napisanie skryptu ktury robil cos w stylu logowania tylko pobieral by dane z bazy danych macie moze kod zrodlowy takiego skryptu??
|
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 12 Pomógł: 0 Dołączył: 10.03.2004 Ostrzeżenie: (0%) ![]() ![]() |
Co wiec tu jest nie tak??
[php:1:3fba40ab68] <? ob_start(); ?> <?php print '<FORM ACTION="haselko.php" METHOD=POST>'; print 'Login: <INPUT TYPE="text" NAME="login" VALUE=""><BR>'; print 'Haslo: <INPUT TYPE="text" NAME="pass" VALUE=""><BR>'; print '<INPUT TYPE="submit" VALUE="Wyslij">'; print '</FORM>'; function logIn($login, $pass){ $pass = md5($pass); $dbQuser = mysql_query("SELECT * FROM nuke_haslo WHERE login = '". $login ."'"); $rowUser = mysql_fetch_array($dbQuser); if($rowUser['login'] == $login){ if($rowUser['pass'] == $pass){ setcookie('login', $login, time()+3600*24*365); setcookie('pass', $pass, time()+3600*24*365); header("Location: http://www.wp.pl"); //print('OK'); // ok }else{ print('<div align="center"><font color="red">Z³e has³o</font></div>'); // blad } }else{ print('<div align="center"><font color="red">Z³y login</font></div>'); // blad } } ?> <? ob_end_flush(); ?> [/php:1:3fba40ab68] |
|
|
![]() ![]() |
![]() |
Aktualny czas: 9.10.2025 - 15:36 |