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

  • SEARCH
  • Home
  • 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 144119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T08:12:11+00:00 2026-05-11T08:12:11+00:00

I write the code for my own website as an educational/fun exercise. Right now

  • 0

I write the code for my own website as an educational/fun exercise. Right now part of the website is a blog (like every other site out there :-/) which supports the usual basic blog features, including commenting on posts. But I only have comments enabled for logged-in users; I want to alter the code to allow anonymous comments – that is, I want to allow people to post comments without first creating a user account on my site, although there will still be some sort of authentication involved to prevent spam.

Question: what information should I save for anonymous comments? I’m thinking at least display name and email address (for displaying a Gravatar), and probably website URL because I eventually want to accept OpenID as well, but would anything else make sense?

Other question: how should I modify the database to store this information? The schema I have for the comment table is currently

comment_id       smallint(5)       // The unique comment ID post_id          smallint(5)       // The ID of the post the comment was made on user_id          smallint(5)       // The ID of the user account who made the comment comment_subject  varchar(128) comment_date     timestamp comment_text     text 

Should I add additional fields for name, email address, etc. to the comment table? (seems like a bad idea) Create a new ‘anonymous users’ table? (and if so, how to keep anonymous user ids from conflicting with regular user ids) Or create fake user accounts for anonymous users in my existing users table?

Part of what’s making this tricky is that if someone tries to post an anonymous comment using an email address (or OpenID) that’s already associated with an account on my site, I’d like to catch that and prompt them to log in.

  • 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. 2026-05-11T08:12:11+00:00Added an answer on May 11, 2026 at 8:12 am

    The whole point of anonymous comments is that users don’t have to login, right?

    My personal taste is to not force the user to enter anything, not even their name! The only requried field is the comment text itself. If they don’t want to give out their name or email, fine, who cares?

    If they provide an email that already exists, there’s a chance that they registered a looong time ago and don’t even remember their password.

    Again, don’t force the user to login in that case. Just give them a choice to either login or leave email field blank (or change its content). Or, just show a warning box telling them that the comment will be sent without the email address, with ‘ok’ and ‘cancel’ options.

    So, what to store with the anonymous comment?

    I’d say store their name and email (of course, don’t display their email to the public), but make them optional fields, not mandatory.

    You can also store their website, although I personally don’t know what’s the point of that, other than maybe self-advertising for the anonymous poster!

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

Sidebar

Ask A Question

Stats

  • Questions 119k
  • Answers 119k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer JavaScript is case sensitive. Try: document.getElementById('recentlyaddedtip'); Notice the small 'g'. May 11, 2026 at 11:50 pm
  • Editorial Team
    Editorial Team added an answer You use xs:key and xs:keyref. Here's an example May 11, 2026 at 11:50 pm
  • Editorial Team
    Editorial Team added an answer If you type /// the IDE editor will automatically generate… May 11, 2026 at 11:50 pm

Related Questions

OK, so I've got this totally rare an unique scenario of a load balanced
I was wondering how you guys actually develop large applications when you are your
I have to interface with a slightly archaic system that doesn't use webservices. In
I am asking this question because I know there are a lot of well-read

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.