Re: [PHP] Login determines content on page

2002-05-29 Thread Miguel Cruz

On Wed, 29 May 2002, Dr. Indera wrote:
 I'd to know how difficult it is to achieve the following:
 
 Create login page, when the submit button is clicked, the user info is
 checked against a database as to whether is login info is valid. if it
 is valid, a page is displayed that lists all of the classes that the
 user has registered for, meaning each user will see a different list of
 classes.

It's very easy. Just take it slow and break your approach into steps.

First deal with the login stuff. There are countless examples in the list
archives here as well as on PHP development web sites from here to
Vladivostok.

Then all you have to do is fall through from your login function to your 
main page, which looks at the login credentials to determine which data to 
display.

miguel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Login determines content on page

2002-05-28 Thread Dr. Indera

Hello,

I'd to know how difficult it is to achieve the following:

Create login page, when the submit button is clicked, the user info is checked against 
a database as

to whether is login info is valid. if it is valid, a page is displayed that lists all 
of the classes

that the user has registered for, meaning each user will see a different list of 
classes.

Thanks
Indera


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Login determines content on page

2002-05-28 Thread Dr. Indera

Hello,

I'd to know how difficult it is to achieve the following:

Create login page, when the submit button is clicked, the user info is checked against 
a database as

to whether is login info is valid. if it is valid, a page is displayed that lists all 
of the classes

that the user has registered for, meaning each user will see a different list of 
classes.

Thanks
Indera



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Login determines content on page

2002-05-28 Thread Jule

That's all possible using an SQL database (www.mysql.com)
just think about the databnse first before you actually make it, i ran into a 
lot of problems because i just kept adding tables whenever i needed them
a good hint is to write scemes of your script and what ylu want to achieve on 
paper before actually starting coding..

see www.php.net and www.mysql.com for all the docs you need. They really 
helped me along, so did the this list.

Jule

On Wednesday 29 May 2002 00:24, Dr. Indera wrote:
 Hello,

 I'd to know how difficult it is to achieve the following:

 Create login page, when the submit button is clicked, the user info is
 checked against a database as

 to whether is login info is valid. if it is valid, a page is displayed that
 lists all of the classes

 that the user has registered for, meaning each user will see a different
 list of classes.

 Thanks
 Indera

-- 
|\/\__/\/|
|   Jule Slootbeek   |
|   [EMAIL PROTECTED]|
|   http://blindtheory.cjb.net   |
|   __   |
|/\/  \/\|

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] login determines content on page

2002-02-24 Thread William Lovaton

El sáb, 23-02-2002 a las 01:56, jtjohnston escribió:
 What's the difference between
 if (isset($submit_happening))
 and
 if $submit_happening)

if (isset($var))  evaluates whether $var exists or not
if ($var) evaluates de value of $var

$var = 1;
if(isset($var))  --  TRUE
if($var) --  TRUE

---===(O)===---

$var = 0;
if(isset($var))  --  TRUE
if($var) --  FALSE


William


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] login determines content on page

2002-02-22 Thread djo

On Fri, 22 Feb 2002 21:38:16 -0500, you wrote:

I'd to know how difficult it is to achieve the following:

Create login page, when the submit button is clicked, the user info is checked 
against a database as
to whether is login info is valid. if it is valid, a page is displayed that lists all 
of the classes
that the user has registered for, meaning each user will see a different list of 
classes.

At first, I thought this was a homework question, but that seems
unlikely. Ok, one way to do this is to have a form submit to itself. 

Briefly :

?
if (isset($submit_happening)) {
if ($username == david  $password=xyzzy) {
echo(Successfully logged in);
} else {
echo(Not logged in);
}
} else {
?
form method=post action=?=$PHP_SELF?
input type=hidden name=submit_happening value=1
input type=text name=username
input type=password name=password
/form
?
}
?

Untested. If you want to store a user's logon status permanently, look
at sessions. http://www.php.net/manual/en/ref.session.php

djo


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] login determines content on page

2002-02-22 Thread jtjohnston

What's the difference between
if (isset($submit_happening))
and
if $submit_happening)

John

[EMAIL PROTECTED] wrote:

 On Fri, 22 Feb 2002 21:38:16 -0500, you wrote:

 I'd to know how difficult it is to achieve the following:
 
 Create login page, when the submit button is clicked, the user info is checked 
against a database as
 to whether is login info is valid. if it is valid, a page is displayed that lists 
all of the classes
 that the user has registered for, meaning each user will see a different list of 
classes.

 At first, I thought this was a homework question, but that seems
 unlikely. Ok, one way to do this is to have a form submit to itself.

 Briefly :

 ?
 if (isset($submit_happening)) {
 if ($username == david  $password=xyzzy) {
 echo(Successfully logged in);
 } else {
 echo(Not logged in);
 }
 } else {
 ?
 form method=post action=?=$PHP_SELF?
 input type=hidden name=submit_happening value=1
 input type=text name=username
 input type=password name=password
 /form
 ?
 }
 ?

 Untested. If you want to store a user's logon status permanently, look
 at sessions. http://www.php.net/manual/en/ref.session.php

 djo

--
John Taylor-Johnston
-
  ' ' '   Collège de Sherbrooke:
 ô¿ô   http://www.collegesherbrooke.qc.ca/languesmodernes/
   - Université de Sherbrooke:
  http://compcanlit.ca/
  819-569-2064



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] login determines content on page

2002-02-22 Thread Rasmus Lerdorf

Well, if $submit_happening is set to 0, 0 or false then

if($submit_happening) will evaluate to false while
if(isset($submit_happening)) will evaluate to true

As the documentation (please read http://www.php.net/isset) isset()
returns true if the variable exists and false if it doesn't.

-Rasmus

On Sat, 23 Feb 2002, jtjohnston wrote:

 What's the difference between
 if (isset($submit_happening))
 and
 if $submit_happening)

 John

 [EMAIL PROTECTED] wrote:

  On Fri, 22 Feb 2002 21:38:16 -0500, you wrote:
 
  I'd to know how difficult it is to achieve the following:
  
  Create login page, when the submit button is clicked, the user info is checked 
against a database as
  to whether is login info is valid. if it is valid, a page is displayed that lists 
all of the classes
  that the user has registered for, meaning each user will see a different list of 
classes.
 
  At first, I thought this was a homework question, but that seems
  unlikely. Ok, one way to do this is to have a form submit to itself.
 
  Briefly :
 
  ?
  if (isset($submit_happening)) {
  if ($username == david  $password=xyzzy) {
  echo(Successfully logged in);
  } else {
  echo(Not logged in);
  }
  } else {
  ?
  form method=post action=?=$PHP_SELF?
  input type=hidden name=submit_happening value=1
  input type=text name=username
  input type=password name=password
  /form
  ?
  }
  ?
 
  Untested. If you want to store a user's logon status permanently, look
  at sessions. http://www.php.net/manual/en/ref.session.php
 
  djo

 --
 John Taylor-Johnston
 -
   ' ' '   Collège de Sherbrooke:
  ô¿ô   http://www.collegesherbrooke.qc.ca/languesmodernes/
- Université de Sherbrooke:
   http://compcanlit.ca/
   819-569-2064



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php