Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6194957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:23:03+00:00 2026-05-24T03:23:03+00:00

I have a website that is using SMF forum (simplemachines.org). I have been using

  • 0

I have a website that is using SMF forum (simplemachines.org). I have been using it also as the site’s login by leveraging the SSI.php file which is basically an API for the forum.

Now that I am this far in my site project, I want to add additional functionality. One thing I want to do is add lots of custom variables that a user can have, which is difficult when modifying the built-in users table of SMF. I also want to allow users to join “teams”. A team can have multiple users in it.

I have been playing around with PHP and MySQL and have learned how to create a user registration script and add a user to a simple single database table (no longer using SMF).

The database table has:

ID, Username, Password (not plaintext), Date

How do I take my SQL knowledge to the next level; I want to now create a table called Teams which will logically hold this data: An ID, a Name, Admin True/False (I want multiple team members to be admins if needed).

I figure a form should be created that will make a new Team. When submitted, if the team name doesn’t already exist, create a new team, and the user that MADE the team should automatically be the first admin.

1) I have no idea how to link 2 tables, which is the entire point of this topic. When I create a user profile page, I want it to list the teams he is in.

This means it needs to take his user ID from the Users table and connect it to the Teams table and if it finds his ID in that Teams table, return the array containing all of his teams he is in and I’ll display them how I want.

I think that I posted way too much detail but it will help you help
me. Additionally, that above knowledge will help me with everything
else I want to do, like adding multiple teams to some other table.
It’s all the same once you know how to do it!!

Thanks!

2) Just realized another problem of mine, once I have this custom database, I lose the ability to provide single sign-on on the forum, which is awesome. Two accounts to interact on website and interact on forum is really stupid. Does phpBB or other “Big Player” Forum have a way to easily use custom database logins?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T03:23:04+00:00Added an answer on May 24, 2026 at 3:23 am

    One way of ‘linking’ the two tables would be to create a membership table such as

    MembershipTable
    -----------------------------
    | UserID | TeamID | IsAdmin |
    -----------------------------
    

    This way, the user’s details is kept in the Users table and team definition information stays in the teams table.

    If for a user with an userid $id, you want to find all the teams it is a member of, you can run a simple SQL query:

    SELECT t.team_name
    FROM   MembershipTable m
    LEFT JOIN team_table t on M.userID = t.UserID
    

    Should be simple to infer from the above what the definitions of the user and team tables should look like.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a website that written with php and using mysql, I want to
I have a website that was originally developed using a SQL Express database in
I have a Website that is really slow and feels really bad when using
I have a ASP.Net 2.0 website that is currently using a custom MembershipProvider and
I have an ASP.NET MVC (Beta 1) website that I'm using themes with. When
I have a website that's using forms authentication and membership. A user must have
I have a website that uses ajax jquery and facebox. Demo here : http://temp.nevergone.eu/facebox.php
I have a website that displays the current date using the code Datetime.Now .
I have a website that my company hosted using hubspot.. now the guy who
I am creating a website that is using a perl script, PHP, a MySQL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.