Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [Logowanie] if else itp
Cr0n!x
post 14.06.2003, 13:22:28
Post #1





Grupa: Zarejestrowani
Postów: 40
Pomógł: 0
Dołączył: 24.05.2003

Ostrzeżenie: (0%)
-----


Jak zmienic ten skrypt zeby sprawdzal tez haslo. Teraz wystarczy ze poda sie login jaki jest i juz sie jest zalogowanym.


Kod
<?





if (file_exists("users/".$HTTP_POST_VARS['login'].".usr"))

{

require("users/".$HTTP_POST_VARS['login'].".usr");

}

if ($HTTP_POST_VARS['login']=="$password")

{

echo "zalogowany";

}

else

{

echo "Zly login/haslo lub usytkownik ".$HTTP_POST_VARS['login']." nie istnieje.";

}





?>


Dzieki
Go to the top of the page
+Quote Post
KaMeLeOn
post 14.06.2003, 13:26:22
Post #2





Grupa: Zarejestrowani
Postów: 680
Pomógł: 0
Dołączył: 1.10.2002
Skąd: Wrocław

Ostrzeżenie: (0%)
-----


[php:1:8f6d910dd2]<?php
if (file_exists("users/".$_POST['login'].".usr") )
{
require("users/".$_POST['login'].".usr");
}

if ( ($_POST['login'] ==$login) && ($_POST['password'] == $password) )
{
echo "zalogowany";
} else
{
echo "Zly login/haslo lub usytkownik ".$HTTP_POST_VARS['login']." nie istnieje.";
}
?>[/php:1:8f6d910dd2]

Proszę używać znaczników php...


--------------------
"Czerp z innych, ale nie kopiuj ich. Bądź sobą." Michel Quoist
Go to the top of the page
+Quote Post
Cr0n!x
post 14.06.2003, 13:37:47
Post #3





Grupa: Zarejestrowani
Postów: 40
Pomógł: 0
Dołączył: 24.05.2003

Ostrzeżenie: (0%)
-----


Bardzo dziekuje meczylem sie z tym i nic ;/.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 22.06.2025 - 12:08