/    Sign up×
Community /Pin to ProfileBookmark

Protecting Html Site with Php Loging Script

Hi

just wondering if someone could help me. I have a html site that need securing. I have setup a php – mysql login form and it works fine. What i need to know is how do i stop people bypassing it by putting in /the name of a html page

Any help would be much appreciated

Thanks

Martin

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@CaptainSessaOct 05.2011 — You might to want a look at this:

http://php.net/manual/en/features.sessions.php

On successful authentication you save a value in the session that says if the user is authenticated.. you then have to check on every page on top, if this value is set, or else you just exit or redirect ?
Copy linkTweet thisAlerts:
@EleqtriqOct 06.2011 — You could use Sessions like suggested above or another option would be to embed the HTML page inside of the PHP login script, and print it out if the login was correct. That would only work if you have one page though. Sessions are probably your best bet.
×

Success!

Help @martinlamp 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,
)...