Need a little help displaying MySQL value in form textbox

Discussion in 'MySQL' started by j0563, Oct 29, 2010.

  1. #1
    I have a "store_config" table in my database where I store different configuration values for my site.

    Each option is stored with a unique "config_name" and "config_value". For example, "config_name" could be "homepage" and it's "config_value" could be "http://www.google.com". Another "config_name" could be "default_language" and it's "config_value" would be "English".

    I am trying to make a form where the user can update these configuration values. But since they are all stored as either a "config_name" or a "config_value" I am having trouble.

    I am trying to get all the values already stored in the database to show in the textboxes, something like:

    <input type="text" name="language" value="<?php echo $the_default_language; ?>" />
    HTML:
    I just can't seem to get this to work.

    Do you have any suggestions???
     
    j0563, Oct 29, 2010 IP
  2. redditor

    redditor Guest

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Post your sql queries and the output and we can try to debug the issue.
     
    redditor, Nov 6, 2010 IP