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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:45:02+00:00 2026-05-20T15:45:02+00:00

In my DB i have a table that stores my site settings per user.

  • 0

In my DB i have a table that stores my site settings per user. The columns look like this:
id, user, componentType, text, value, active (0 or 1)

And some demo data would be:

1, 1, 1, "Gallery", "/gallery", 1
2, 1, 1, "Poll", "/poll", 0

NOW, i have made a page that lists all settings for the user, the above are for me. This page lets you change text and active(checkbox).

Displaying them on the webpage is a no-brainer, but how do i do it when i post it back to the server? Some users have more settings then others… i was thinking of doing something like this per setting, the data below is for the first setting for my user:

<input type="text" name="text-1", value="Gallery" />
<input type="checkbox" name="active-1" checked />

I’m not 100% steady when it comes to php regex and stuff, but im guessing that is the way i have to go when i dont know what settings that are comming in to the server from the form?

  • 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-20T15:45:03+00:00Added an answer on May 20, 2026 at 3:45 pm

    As I understand you always edit the settings for one particular user. Then you can add a hidden form field into your form which tells you which user is the one editing the settings.

    The other option would be, as you wrote, to add the userID information directly to the name of the field and then parse it. But I would recommend the first option with hidden field.

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

Sidebar

Related Questions

this site is like an ecommerce site and i have two tables that i'm
I have a table that stores comments users make about images on the site.
I have a site I am developing and it has a table that stores
I have a table that stores all the volunteers, and each volunteer will be
I have a table (venues) that stores all the possible venues a volunteer can
Say I have a table called xml that stores XML files in a single
I have a basic property bag table that stores attributes about my primary table
I run a lyrics web site and I have a single table that basically
Let's suppose that we have multi-site CMS and every website in this CMS having
I have a table Items which stores fetched book data from Amazon. This Amazon

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.