php-db | 2002091
Date: 09/14/02
- Next message: Edward Peloke: "[PHP-DB] editable grid"
- Previous message: Dave Smith: "Re: [PHP-DB] sending hidden value with form element"
- In reply to: Ray Healy \(Data Net Services\): "[PHP-DB] Newbie question - is this possible"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Well Ray, please don't cross-post.
There are lots of tutorials on this sort of thing, and code examples.
All of these tables can be contained within the same database - call the
first login, the seconds one win_result. The first would contain, as a
minimum username, password and some kind of key_value. When the user
successfully logs in (authenticates) pass the key value to a session
variable which can then be used on all subsequent pages. A little bit of
code at the top of each of these pages would test for the presence of the
session var and redirect to the login page if it did not exist.
One of these pages could be the page which displays the user's results from
the win_result table, which would have fields such as key_value(which would
be a foreign key) along with the other ones you mentioned.
The beauty of using a session is that you can check authentication on each
page, thus keeping people from blasting in via Google. The session var
contains information particular to your authenticated user which you may
use to display selected information, and you can provide a log out
function, which you do by destroying the session and its associated vars.
Your set of pages can be confidently used from a public computer.
I keep sending people to Julie Meloni's site http://www.thickbook.com,
mostly because her tutorials are so well developed, and the final result
really launches you into practical work. There you will find what you need.
There are also good tutorials at DevShed, WebMoneky, Zend etc.
Hope this helps - Miles Thompson
At 07:14 PM 9/14/2002 +0100, Ray Healy \(Data Net Services\) wrote:
>Dear All
>
>Could someone advise whether this is possible to do using PHP & mySQL and
>if so could they point me in the right direction or web site.
>
>What I want to do is to set up a user/password database and then another
>database with the users information in it (have not decided what rows to
>have - say name , address, picked numbers, wins, losses).
>
>When a user comes to my site a login box will appear where they type there
>username & password. This is checked with the 1st database and if OK there
>details are displayed by getting them from the 2nd database.
>
>This way the user can only ever see their own data and no one else's.
>
>I can probably work out how to set the login check but cannot plan in my
>head how to then display that users details from the other database.
>
>I hope this makes sense. I have posted this in both groups as it is
>database related as well.
>
>Any comments much appreciated.
>
>Thanks
>
>Ray
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Edward Peloke: "[PHP-DB] editable grid"
- Previous message: Dave Smith: "Re: [PHP-DB] sending hidden value with form element"
- In reply to: Ray Healy \(Data Net Services\): "[PHP-DB] Newbie question - is this possible"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

