Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
PHP - Java Login

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side
View previous topic :: View next topic  
Author Message
Hrvoje



Joined: 04 Sep 2004
Posts: 132
Location: My office

PostPosted: 12.09.2006 12:54    Post subject: PHP - Java Login Add user to your forum ignore list Reply with quote

Pozdrav svima,

Tražim na netu neku jednostavniju skriptu za login ali mi treba za više korisnika.
Tako sto bi ja svakom korisniku definirao korisničko ime i zaporku.

Može biti php ili java.
Back to top
View user's profile Send private message
snyder



Joined: 21 Dec 2005
Posts: 57
Location: Zagreb

PostPosted: 12.09.2006 12:59    Post subject: Add user to your forum ignore list Reply with quote

sa mysql bazom ili sa fileom?
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Hrvoje



Joined: 04 Sep 2004
Posts: 132
Location: My office

PostPosted: 12.09.2006 13:02    Post subject: Add user to your forum ignore list Reply with quote

Sa fileom.
Back to top
View user's profile Send private message
snyder



Joined: 21 Dec 2005
Posts: 57
Location: Zagreb

PostPosted: 12.09.2006 13:05    Post subject: Add user to your forum ignore list Reply with quote

ok, moram malo preradit. valjda cu danas, javim ti
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Hrvoje



Joined: 04 Sep 2004
Posts: 132
Location: My office

PostPosted: 14.09.2006 13:30    Post subject: Add user to your forum ignore list Reply with quote

Našao sam ovo i ta skripta mi odgovara, ali imam problem!
Kad se korisnik uspiješno logira kako da napravim redirect na neku određenu stranicu.

Taj redirect bi mi trebao biti o ovom kodu:



Quote:
<?

if($f_user != "" && $f_pass != ""){

$users = file("users.dat");

if(!ereg("$f_user\|", $users[0])) die("<b>'$f_user'</b> Neispravno korisničko ime ili zaporka, molimo pokušajte ponovno!.");

$users = explode(",", $users[0]);

foreach($users as $l_user){

if(strstr($l_user, $f_user)){

list($user, $pass) = explode("|", $l_user);

if($f_pass != $pass)


{

die("Pristup zabranjen: $user.");

}




{

die("Prijavljeni ste kao korisnik: <b>$user.</b>");

}



break;

}

}

}else{
?>

<form name="login" method="post" action="<?=$PHP_SELF?>">
<table width="140" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="140"><p><strong><font color="#FFFFFF">Korisničko ime: </font></strong></p>
<p> <strong><font color="#FFFFFF">
<input type="text" name="f_user" style="width: 115px;">
</font></strong></p></td>
</tr>
<tr>
<td><p><strong><font color="#FFFFFF">Zaporka: </font></strong></p>
<p> <strong><font color="#FFFFFF">
<input type="password" name="f_pass" style="width: 115px;">
</font></strong></p></td>
</tr>
<tr>
<td><strong><font color="#FFFFFF">
<button onClick="login.submit();">Login</button>
</font></strong></td>
</tr>
</table>
</form>
<?
}
?>
Back to top
View user's profile Send private message
retro_one



Joined: 16 Sep 2003
Posts: 880
Location: DUBRAVA.

PostPosted: 14.09.2006 14:08    Post subject: Add user to your forum ignore list Reply with quote

lmao...ovaj kod koristi onclick na buttonu za submit forme umjesto submit button Shocked

_________________
Just your average eccentric programmer.
Back to top
View user's profile Send private message
che.UP
mi3.crew


Joined: 07 Sep 2003
Posts: 2320
Location: zagreb

PostPosted: 14.09.2006 15:10    Post subject: Add user to your forum ignore list Reply with quote

daj link :)

_________________
UP | TypeTester | Accommodations App
Meni u Firefox-u ne radi AJAX
Back to top
View user's profile Send private message Visit poster's website
Hrvoje



Joined: 04 Sep 2004
Posts: 132
Location: My office

PostPosted: 14.09.2006 15:46    Post subject: Add user to your forum ignore list Reply with quote

retro_one wrote:
lmao...ovaj kod koristi onclick na buttonu za submit forme umjesto submit button Shocked


Promijenio sam na submit Smile

che.up-- Stranica još nije online...

Dali ima netko nekakvo rješenje?
Back to top
View user's profile Send private message
retro_one



Joined: 16 Sep 2003
Posts: 880
Location: DUBRAVA.

PostPosted: 14.09.2006 16:32    Post subject: Add user to your forum ignore list Reply with quote

prouci header funkciju u php manualu

_________________
Just your average eccentric programmer.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group