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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:40:32+00:00 2026-05-26T12:40:32+00:00

I cannot find any answers on the following issue. On my website I would

  • 0

I cannot find any answers on the following issue.
On my website I would like to have a chackbox with id="filter".
The checkbox is needed to allow users choose between “moderated” and “all other” content e.g. if checkbox is checked show “moderated” content, if checkbox is un-checked show “all other content” .

I have 2 different mySQL queries for conntents:

Moderated Content

$moderated_content = mysql_query("SELECT * FROM articles WHERE showing=1");

All Other Content

$allOther_content = mysql_query("SELECT * FROM articles");

Therefore I would like to use these different queries depending on a state of checkbox. I have a cookie that remembers if user has checked or un-checked a checkbox. And I can show different content when they visit the website.

And here is the problem. Say user is already on the webpage and his/her checkbox is unchecked, so they than decide to check a checkbox. How can I show new content after they checked it? I’d like to use AJAX, but I’m not good with it, so the best solution for me would be a page refresh I guess.

Thank You

  • 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-26T12:40:32+00:00Added an answer on May 26, 2026 at 12:40 pm

    you can check the value for checked like for example ,

    if($_POST['filter'] == 1){ 
      // checked
        $moderated_content = mysql_query("SELECT * FROM articles WHERE showing=1");
     }else{
     //not checked
    }  
    

    and you would check if its isset so you dont get any notices

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

Sidebar

Related Questions

I've searched google and cannot find any answers to the particular problem. I have
I have searched for some answers but I cannot find anything. So how do
I have looked through the answers in this forum but cannot seem to find
I've searched all over for an answer to this, but cannot find any clear
Cannot find any example on Google.
I cannot find any info on agner.org on the latency or throughput of the
i cannot find any documentation of this project
I am implementing an AbstractAccountAuthenticator and I cannot find any information regarding the dimensions
I'm missing something, but I cannot find any hint online. When I use Javascript's
This is but a curious question. I cannot find any useful links from Google

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.