Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

50 users online



need help with membership system

need help with membership system

Currently viewing this thread: 1 (0 members and 1 guests)


Page 1 out of 2
Tuss4

Tuss4

Status: Offline!

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.

Motorspin

Motorspin

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
http://motorspin.com/stuff/images/avasig/m_enterprisesig.gif

Tuss4

Tuss4

Status: Offline!

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

Motorspin

Motorspin

Neverside Newbie
Status: Offline!

Use WHERE in the query statement.

ie

SELECT post_count FROM users WHERE username = '$username';

___________________

Travis Farrell
http://motorspin.com/stuff/images/avasig/m_enterprisesig.gif

Ynhockey

Ynhockey

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

Tuss4

Tuss4

Status: Offline!

how would i type that in the table?

Ynhockey

Ynhockey

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

Motorspin

Motorspin

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. Smile

___________________

Travis Farrell
http://motorspin.com/stuff/images/avasig/m_enterprisesig.gif

Fitzo

Fitzo

PHP g00n
Status: Offline!

The table scheme would look something like this.

Code:


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`));

___________________

http://www.edenstar.net/images/siggy.gif

X-plozive

X-plozive

Status: Offline!

You could always use another table where it stores the post text etc...

Page 1 out of 2
Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0204 seconds.