/    Sign up×
Community /Pin to ProfileBookmark

Safe login in PHP

normal i only doe this when i tjeck about one user is login

if ($_SESSION[‘User’][‘Id’])
{
its logt in.
}

bot i think its easy to hack its right? or not…. if its right how can i doe it more safe?

tanks for helping.

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@legendxNov 25.2006 — You're probably thinking of cookies. It's next to impossible to change the information stored in $_SESSION['User']['Id'] since the data is on the server, but someone could steal the session id which is stored on the browser (in COOKIE form or in part of the URL). The result of this is that someone could impersonate you by somehow getting your session id, pasteing it into their web browser, and go to your website before the session expires.

I don't really think it is a security risk. I compare it to someone stealing your password. It's gonna happen, but is it really your fault, or the users?
Copy linkTweet thisAlerts:
@NeoNmaNauthorNov 27.2006 — Okay, it's becures i think i will make the nice website whit no risk to be hack'et easy ? and i have make user logins whit Session all my time ? bot i think it's be easy to hack so i ask to be sure ?
×

Success!

Help @NeoNmaN spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...