Secure Login PHP

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I am trying to develop a PHP site so that I may record my poker
winnings and display the results on my blog.  I haven't used php in a
long time so I need to beginner type help.  I know I am going to have
to write a login page that communicates with a MYSQL sever so that
shouldn't be an issue either.  My issue is I am not sure if I should
write code to check login state to appear on every page after the
login.  I also when the user hits the submit button on the webpage
should I post the webpage to itself or should I pass the user info to
the next page and do the user validation there.  Please let me know
what I should do.

Re: Secure Login PHP

wqmmnm wrote:
Quoted text here. Click to load it

Yes, you need to check the login state on every page where that state is  
important (i.e. it probably isn't on your home page, so you wouldn't  
need it there).

As for validation - it all depends.  I do it both ways; which one I use  
depends on the needs at the moment.

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Re: Secure Login PHP

Quoted text here. Click to load it

Your question is somehow unclear but, as far as i understood, you did
not need a mysql server and looking some way to keep others from your
pages being watched something like that.

    echo("some directive");
else die("you are not authorized");
Furthermore you can start a session and assign the username session
variable on each page so will setup a basic login authorization.
However you need to pass through the php lang reference to remind,
giving you a code here will not be useful.

Best code in the world is the code you coded. ;)

Site Timeline