|
Posted by Betikci Boris on 01/03/08 11:26
On Dec 29 2007, 9:43 pm, wqmmnm <wqm...@gmail.com> wrote:
> 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.
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.
<?php
$user="myusername";
if($_POST['username']==$user)
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. ;)
[Back to original message]
|