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 4041700
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T12:54:48+00:00 2026-05-20T12:54:48+00:00

I just got into somewhat complex databases (complex for me) and I have been

  • 0

I just got into somewhat complex databases (complex for me) and I have been wondering if I’m going to be doing this right. Below is what I’m trying to achieve.

Goal: Store post data for a registered user. Then retrieve the posted data for that user.

I have a table with registered users called members and it contains their userid, username, timeReg, password. How can I store more data for each user? Specifically their posts.

If the user logs in how can I display their posts and not posts from someone else? Do I create a new table called posts to store the data? Or do I add a posts field inside the members table?

So far my code for no user at all but for retrieving everything is below:

$sql_query = "SELECT * FROM members ORDER BY timeReg DESC";
$result = mysql_query($sql_query);
if (mysql_num_rows($result)) {

    echo "<table border='1' cellspacing='0' width='62%'>";
        echo "<tr>";
        echo "<th width='15%'>Time Registered</th>";
        echo "<th width='15%'>Username</th>";
        echo "<th width='15%'>Encrypted Password</th>";
        echo "<th width='15%'>IP Address</th>";
        echo "<th width='2%'>Delete User</th>";
        echo "</tr>";
    while ($row = mysql_fetch_row($result))
    {
        echo "<tr>";
        echo ("<p><td>" .genericTime($row[2]). "</td><td>$row[0]</td><td>$row[1]</td><td><i>$row[3]</i></td><td><a href=\"delete.php?time=$row[2]&user=$row[0]&pass=$row[1]\"><center>[x]</center></a></td></p>");
        echo "</tr>";
    }
    echo "</table>";
}
else
{
    echo "*No Members*";
}
  • 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-20T12:54:48+00:00Added an answer on May 20, 2026 at 12:54 pm

    You are basically asking us how to get you started in making a forum or storing the posts of a forums form with a post method?

    In that case you need to add another table in your MySQL Database you use.
    In my experience most people store the starting thread and the reply posts in 2 different tables. I wouldn’t store them in the members table, something new like ‘posts’ and ‘threads’.
    As for how many rows and the names for them it is all up to you, but usual sites do ‘postid’, ‘posttitle’, ‘createdtime’, ‘author’, ‘lastedittime’, ‘lasteditauthor’, ‘content’, ‘forumid’.

    Thats the basics, so yea. hope this is the answer you where looking for.

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

Sidebar

Related Questions

Just got a question about generics, why doesn't this compile when using a generic
I just got Delphi 2009 and have previously read some articles about modifications that
I just got this error message: ... from c:/ruby/lib/ruby/gems/1.8/gems/... ... 10 levels... from c:/ruby/lib/ruby/gems/1.8/gems/...
Just got a request from my boss for an application I'm working on. Basically
I just got a dedicated server from a hosting company, and for some reason,
I just got through manually removing the bin\ and obj\ folders from around 30
I just got a shiny, brand-new Debian server handed to me by our Systems
I just got my azure invitation code...yay! Are there any official samples for windows
I just got done working through the Django tutorials for the second time, and
I just got myself a new toy, a phone with Windows Mobile 6. I'm

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.