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
Login problem

 
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
Bassterix



Joined: 04 Oct 2006
Posts: 19

PostPosted: 01.05.2007 17:44    Post subject: Login problem Add user to your forum ignore list Reply with quote

Ukratko: U FF-u sve radi kako treba, u IE6, ne.

Udulje: Koristim neki svoj homemade bućkuriš. FF nema nikakvih problema, a IE...
Na localhostu sam stalno logiran. Pobrišem history, cookies, ma sve živo; i dalje sam logiran. Na remote hostu, ništa. Štogod napravio, login prolazi, ali iako je cookie postavljen, čim odem na drugu stranicu i vratim se na ovu, odlogiran sam. Ispod je kod, pa ako netko ima savjet, ideju.... nek pukne Smile

....
<body onload="checkLoad()">
...

function checkLoad() {
var url = "php/check_cookie.php";
pass_obj.open("GET", url, false);
pass_obj.send(null);
var response = pass_obj.responseText;
if (response == "Ok") {
ldinto();
}
}

// check_cookie.php

<?
if (isset($_COOKIE["library"]))
echo 'Ok';
else
echo 'Nema';
?>

// ldinto nije bitan

A što se tiče postavljanja, nakon unosa us/pass, te 2 varijable se prenose i poziva f-ja
checkpass

// checkpass

function checkpass(username, password) {
var pass_obj = create();
var url = "php/pass.php";
var out = "username=" + username + "&password=" + password;
pass_obj.open("POST", url, false);
pass_obj.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
pass_obj.send(out);
var response = pass_obj.responseText;
if (response == "Ok") {
ldinto();
is_cookie(out);
}
else alert (response);
}


//is_cookie

function is_cookie(out) {
var cookie_obj = create();
var url = "php/set_cookie.php";
cookie_obj.open("POST", url, false);
cookie_obj.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
cookie_obj.send(out);
}

//set_cookie

<?
$name_pass=$_POST['username'] . "delimiter" . $_POST['password'];
setcookie("library", $name_pass, 0);
?>
Back to top
View user's profile Send private message
Bassterix



Joined: 04 Oct 2006
Posts: 19

PostPosted: 01.05.2007 19:49    Post subject: Add user to your forum ignore list Reply with quote

Ne mogu vjerovati, od doma radi online varijanta Evil or Very Mad Evil or Very Mad Evil or Very Mad

Nije mi jasno u čemu je stvar, ostaviti ću ovo online ako netko ima ideju, imao je sličan problem... ne kužim
Back to top
View user's profile Send private message
ToDD



Joined: 05 May 2005
Posts: 83
Location: Zagreb

PostPosted: 01.05.2007 21:58    Post subject: Add user to your forum ignore list Reply with quote

evo nemam sad vremena puno pa evo samo linkovi

http://www.tizag.com/phpT/phpsessions.php
http://hr.php.net/session
http://php.com.hr/98
http://php.com.hr/58
Back to top
View user's profile Send private message MSN Messenger
Bassterix



Joined: 04 Oct 2006
Posts: 19

PostPosted: 19.05.2007 16:13    Post subject: Add user to your forum ignore list Reply with quote

ToDD wrote:
evo nemam sad vremena puno pa evo samo linkovi

http://www.tizag.com/phpT/phpsessions.php
http://hr.php.net/session
http://php.com.hr/98
http://php.com.hr/58


E, tek se danas mogu pozabaviti ovim. Tak da, s velikim zakašnjenjem

HVALA

Very Happy
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