PDA

View Full Version : Php User authentication in Dreamweaver


JJK28189
08-19-2008, 12:19 AM
I wondered whether someone might help me with what is I think is a fairly basic question I have relating to user authentication in Dreamweaver CS3.

I have a MySQL database with one table in it that contains ID/Username/Password/Email Address/ Name/and some other fields with some financial data in it.

I have created a login page in php with authenticates the user and logs them into a page called access.php. That’s fine and I’ve got that working OK.

On the access.php page I want to display Welcome “Their name” and then display some of the financial data contained in the database relevant to the person that has logged in.

I have set up the page but whatever I do I can only display the data relating to the first record in the database not the record that relates to the person that logged in.

I am using Dreaweaver CS3 server behaviours for this and I think I need to filter something.

Can anyone help as programming isn't really my thing.

Thanks in anticipation

edbr
08-19-2008, 01:33 AM
A logged in member is displayed by their id. it is sent by a form at login as (perhaps)
$_POST['ID'];, the name user will depend on the form field you used.


you need a select statement that use a where ID = $_POST['ID'];

on your access page you need to code

Welcome <?php
echo $_POST['ID'];
?>
you have to use the correct names of your field names and form posts