Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

PHP loging in to MySql

Aug 8, 2005 1:55PM PDT

ive been diging a lil bit and best solution that i could find is not one i like verry much. id like to have one file rather then on each php file.

im looking for a database acess, based on user. not just the root, but rather like people log in at login.php and they are transported to the same type of page that everyone is, how ever it has thier information. and when they click on other lings it keeps them loged in aswell as only thier info.

best info that i could get was this
mysql_connect(address, username, password)


how ever id whant the users to access the databased based on thier user imputed data.

such as, john logs in, john sees john's info from database. and not hellins, or the whole database. i tried taking a peek at how phpbb did thiers but im still confused a little bit.

Discussion is locked

- Collapse -
phpbb is a tad advanced
Aug 9, 2005 4:56AM PDT

I suggest you take a look at members area tutorials on google. Most of them have step by step explainations that will really help. If you still have problems email me.

- Collapse -
I need a little clarification
Aug 9, 2005 1:05PM PDT

Are you trying to connect to the database differently based on user? Or are you just trying to pull out different information from the database based on each user?

- Collapse -
well...
Aug 9, 2005 3:55PM PDT

well as a normal user

basicly like, how php games are done for example.

how ever, i will also like to make an admin one where they can go in and edit the users, and or formulas.

basicly i really dont whant like, each page to have formula in the form or what ever. i whant it editable using the admin login.

- Collapse -
linked to database...
Aug 9, 2005 3:57PM PDT

ive linked to the database. my book doenst inform me about how to do any of this, i looked. On the net i found somethign that enabled me to link the page to the database. how ever i havent figured out how to get the "tables", like on phpmyadmin.