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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:10:45+00:00 2026-06-13T08:10:45+00:00

I have currently hit a dead-end with my coding, I am rewriting a huge

  • 0

I have currently hit a dead-end with my coding, I am rewriting a huge chunk of code that is related to both changing site wide options that are stored in a database, and also the same for applying permissions on individual users accounts.

On the settings page, I have various settings stored in a database that I want to retrieve from the database to form my page, with the results I have retrieved I then populate a select box for each individual setting with “enabled” or “disabled”, as most of the settings are either 0 or 1.

My question is, what is the best way to fetch the data from the database and create dynamic variables to then use in my settings page? The structure of the table is: id | setting_name | setting_value. I only need setting_name and value, and I would like it if each variable that is made within the while loop was as follows;

setting_name = setting_value;

This is so then I can use that variable to populate my select box.

$sql_query = mysql_query( "SELECT * FROM `setting`" );
while( $row = mysql_fetch_assoc( $sql_query ) )
{           
$row['name'] = $row['value'];
}

I thought the code above would work, however the variable is never created.

Thanks for any help,

  • 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-06-13T08:10:47+00:00Added an answer on June 13, 2026 at 8:10 am

    One more $: $$row['name'] = $row['value']

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

Sidebar

Related Questions

I've hit a dead end with this code I'm working on. I have a
I currently have an application that gets hit with over 20,000 users daily and
In my program I have currently a piece of code that looks like this
I currently have a Python 2.6 piece of code that runs two loops simultaneously.
I own a video streaming website and currently I just have a simple hit
I'm currently writing a Rails app, and hit a somewhat strange quirk. I have
I'm writing a simple shopping cart application and have hit a road block. Currently
What I have currently: A wildcard DNS record. So that every subdomain points to
I currently have an app that is a tab bar style app and supports
I have an ASP.NET web site project that I want to debug, but when

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.