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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T10:36:07+00:00 2026-05-30T10:36:07+00:00

So right now what I am trying is to randomly get a question from

  • 0

So right now what I am trying is to randomly get a question from a set of questions in a table on the database and display them on the form for the person to answer. if that is a bad thing to do please let me know how I should go about it instead. I guess it leaves an easy way to abuse the database, perhaps? I’m not sure.

Well, right now I have the form and the form processing on the same page. The problem is that when it is submitted, it of course refreshes and changes the question, which means unless they get lucky, the answer is wrong. I am not sure how to go about setting it up so that I can generate the random question and make sure when they submit the form that it works out correctly without changing the answer. i have form validation with javascript set up, but that won’t help against bots.

So basically, what I have is

check stuff, connect to databse, etc

$random = mysql_fetch_row(mysql_query("select * from questions order by rand() limit 1"));

clean submitted data, check, submit, etc.

In the form, I have

General form stuff, name, email, etc
<label for="question"><?php echo $random_row[1]; ?></label>
<input type="text" name="question" id="question" required="required"/>

So you can see what I am wanting to do, if that wasn’t clear before.

  • 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-30T10:36:09+00:00Added an answer on May 30, 2026 at 10:36 am

    Your effort seems perfect.

    You need to store question id in session because when you submiting form data in next page you require question which was asked.

    So you will get question detail by question id store in session and compare answer on submitted page.

    Hope this may help.

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

Sidebar

Related Questions

Ok, right now I trying to get a list to echo out from mysql
Right now I'm trying desperately to get @font-face to work in my website. This
Right now, what i'm trying to do is display some lists on a page
I am sooo stumped right now trying to get the layout that I want...I
I'm at my wits end right now trying to get a website working in
Right now I'm trying to set the default audio device on Windows 7 programmatically,
Right now I'm trying to figure out a way to do things smarter, and
Right now I am trying to call my model, and spit out its results
Right now I'm trying to create my own tiny MVC (just for practice and
Right now I'm trying this: int a = round(n); where n is a double

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.