Richard,
Thanks for the reply. However, it's not what I was looking for. :) I
already have all the login and password stuff. What I'm trying to do is
reload a different frame with a new html document once the user logs in.
Thanks again,
MarcJ
In article <045b01c0fee3$a33eb140$6401a8c0@Lynchux100>, [EMAIL PROTECTED]
says...
> > Sorry for the simple question but I'm trying to learn a little more
> > about PHP and just need a little help. I'm currently running PHP3 if
> > that helps. I just need to reload the "main" frame on my site with a
> > new page once the user has logged in. All the navigation and login are
> > handled from a nav frame with PHP script that checks if the user is
> > authenticated. I know I need to put the code in my if...else loop but
> > I'm not sure what the code is.
>
> The FRAMEs are probably making your life harder, rather than easier... Oh
> well.
>
> So, you have a FORM in one FRAME with a NAME=user and NAME=pass field, and
> you want to let them log in with that?...
>
> You'll need to have, in that navigation FRAME:
>
> <FORM ACTION=login.php TARGET=main METHOD=POST>
>
> (Assuming you've used NAME=main in your FRAMESET page to name your man
> frame...)
>
> Then, in login.php, you'll have, well, something to see if their
> username/password are valid...
>
> Probably the easiest, or at least the most common solution, would be a MySQL
> database:
>
> create table user (
> user_id auto_increment unique not null,
> user text,
> pass text
> );
> insert into user(user, pass) values('MarcJ', password('secret'));
>
> NOTE the use of MySQL's "password" function. This basically scrambles the
> word "secret" into something that nobody on the planet can unscramble back
> to secret. More on that later...
>
> Then, in your login page, something not unlike:
>
> <?php
> $query = "select user_id, password('$pass') = pass from user where user
> = '$user'";
> /*
> Okay, now what's going on here?
> We're asking MySQL to look in the "user" table (... from user...)
> for people whose username matches the input (...where user =
> '$user'...)
> and we are getting two things.
> The first is relatively straight-forward: their user_id (select
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]