
August 11th, 2004
08:16 AM
need help with membership system
ok, i have a question when it comes to sql, and everything, like when i have a member registering using sql, his username and password and other information is inserted into the database, right? now here is my question how do i like separate the specific information and stuff so that the username and password are associated together, and also that when they login what is displayed on their welcome page is any information that has to do with them?
thank you in advance.

August 11th, 2004
08:40 AM
Neverside Newbie
Status: Offline!
Each information about that user should be in seperate rows, so you just pull it out using php.
You customize the information that is displaying on their welcome page, there is no actual set guideline.
If you need help, search threads for information.
___________________
Travis Farrell


August 11th, 2004
09:12 AM
i know
but lets say they want to access some information of theirs, like for instance, how much they posted, or how much they donated, how do i do it so that they will only get their info and that of someone elses

August 11th, 2004
09:15 AM
Neverside Newbie
Status: Offline!
Use WHERE in the query statement.
ie
SELECT post_count FROM users WHERE username = '$username';
___________________
Travis Farrell


August 11th, 2004
09:24 AM
Neverside Newbie
Status: Offline!
To expand on Motorspin's explanation, you have to store all that data you want associated with the user in the same table (same row too) and then you can pull it out. So let's say this is your table row (AKA record):
username || pwd || posts_amount
Ynhockey || 3fa667c78eaa3545 || 500
Then you can use a query like Motorspin posted.
___________________
Learn HTML

August 11th, 2004
10:09 AM
how would i type that in the table?

August 11th, 2004
10:47 AM
Neverside Newbie
Status: Offline!
You don't 'type it in the table', first you create the fields using PHPMyAdmin (at least, that's the preferrable way, you can also use CREATE TABLE query, someone posted a guide to that here). Then you fill them using the INSERT INTO query (make a form that the users fill out, then insert the data they fill out into the appropriate fields).
I think you just need to read up on theory, first go to: http://sqlcourse.com for SQL and then http://www.web-realm.com/guide/index.php?page=php_-_phpch6 for info on how to use that in PHP.
Good luck.
___________________
Learn HTML

August 11th, 2004
11:37 AM
Neverside Newbie
Status: Offline!
By the way, SQL is a language (Structured Query Language), not a database. MySQL is a database type. That can be found here.. www.mysql.com
I think you should read some tutorials on MySQL and PHP just so you familarize yourself with what we're saying if you don't know.
Search google.com, the links YnHockey gave you and best of all, SEARCH TF!
Good luck. If you have any questions, this is the place to ask them. 
___________________
Travis Farrell


August 11th, 2004
09:31 PM
PHP g00n
Status: Offline!
The table scheme would look something like this.
CREATE TABLE table_name (
`id` NOT NULL AUTO_INCREMENT default '',
`user` VARCHAR(50) NOT NULL default '',
`pass` VARCHAR(50) NOT NULL default '',
`post_count` VARCHAR(10) NOT NULL default '',
PRIMARY KEY(`id`));
___________________


August 12th, 2004
08:25 AM
You could always use another table where it stores the post text etc...