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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:38:31+00:00 2026-06-15T12:38:31+00:00

I have been asked to create a dial on a wordpress website. The customer

  • 0

I have been asked to create a dial on a wordpress website. The customer wants to be able to update the value of the gauge.

I have two options – I can either create something that sits alongside wordpress where they can update the value, or I can have it as part of wordpress, but I am not sure how to do that or how easy it would be.

Basically I just need a screen where an authenticated user can update a value. I then need to be able to read that value from one of the theme files (specifically the static front page theme file) and display it.

I am comfortable with PHP, but not familiar with wordpress – is there any easy way to do this, or will it make more sense to just do it separately?

  • 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-15T12:38:39+00:00Added an answer on June 15, 2026 at 12:38 pm

    It should be pretty easy actually – WordPress provides the core of what you need to interact with the database.

    Here’s some sample code of a theme I built a few years back. There’s more to it than this, obviously you have to create the table at some point. But once that is in place, the global $wpdb is your gateway.

    function update_game($player, $field, $data)
    {
        global $wpdb;
    
        $table = $wpdb->prefix . "gameplay";
        $where = "tex_id=" . ($player);
    
        $sql = "UPDATE $table SET " .$field. "='" .$data. "' WHERE $where";
    
        $wpdb->query( $sql );
    
    } //End update_game
    

    Alternatively for just a one field, you could use the “options”. e.g.

    function clear_game()
    {
        update_option('tex_deal','w');
        update_option('tex_dealer','0');
        update_option('tex_actor','0');
        update_option('tex_candeal','0');
        update_option( 'tex_flopImg' , '' );
        update_option( 'tex_turnImg' , '' );
        update_option( 'tex_riverImg' , '' );
        update_option( 'tex_pot' , '0' );
        update_option( 'tex_bigbet' , '0' );
    
    }//end clear_game
    

    update_option() is/was in /wp-includes/function.php (I presume it’s still there… it’s been a while) and you would need to call an add_option before hand – get_option() will return the current value.

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

Sidebar

Related Questions

I have been asked to create a website and wanted to design it so
I haven't touched PHP in years and have been asked to create an wordpress
I have been asked to create a website where the homepage consists of a
I have been asked to create some functionality in which marketing team send users
I have been asked to create a vbscript that will set the default font
I am new to web programming...I have been asked to create a simple Internet
For a project I am working on, I have been asked to create an
I have been asked to create a graphical programming IDE for embedded 8-bit and
I have been asked to create import functionality in my application. I am getting
I have been asked by a client to create a site where the content

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.