/    Sign up×
Community /Pin to ProfileBookmark

Help with my php login script!

Ok so I found a post ,by “pyro” on how to build a login only part of a website,
[url]http://www.webdeveloper.com/forum/showthread.php?t=9950[/url]
and I tried to implement it into my site. Problem is that I can’t get it to work to well. Assuming that it is all set up correctly I get “you must be logged in for that 403 error”. Any ideas?

Here is all of my pages:
[url]http://www.sendspace.com/file/hdxn4c[/url]

Thanks!

to post a comment
PHP

6 Comments(s)

Copy linkTweet thisAlerts:
@ZABINov 23.2009 — Hi there u hv wrong url in ur header in passwordreader.php
[code=php]header ("Location:]http://localhost/securityvideo.php");[/code]
change it to
[code=php]header ("Location:http://localhost/securityvideo.php");[/code]
Copy linkTweet thisAlerts:
@NateleducauthorNov 23.2009 — that does seam logical. thanks I will try it!
Copy linkTweet thisAlerts:
@NateleducauthorNov 23.2009 — Thanks that worked! Now I have a new problem, I can still bypass the login and go straight to the sercurityvideo.php. I need it to be able to block anyone who hasn't logged in. I think it has something to do with the protect.php and the header I had to put at the head of each page.

protect.php:

<?PHP


$back = "<form><input type='button' value='< Back' onclick='history.back()'></form>";

$acc_denied = "<h3>Access Denied</h3>".$back; # you could add a link to where users can login here...

if (!isset($_COOKIE["verified"])) { die($acc_denied); }

?>

header:

<? include_once("protect.php"); ?>

I have that header before the <html> bracket. Is this correct?

Thanks in advance!
Copy linkTweet thisAlerts:
@paul454Nov 24.2009 — If you are after a simple to use login script I can recommend User Session Pro, I use it all the time when I build websites.

http://www.prophpscripts.com/scripts/user-session-pro
Copy linkTweet thisAlerts:
@NateleducauthorNov 24.2009 — Nvm close thread. I worked it out
×

Success!

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