7

A web-based example of what I'm looking for is Easy Decision Maker.

As per the example, the question and options will always be the same. I will need to input several options (10+), save them so that I don't have to input them repeatedly, and have the tool accessible from my desktop while I am offline.

1
  • What you need is a Jump To Conclusions mat.
    – Ben Miller
    Feb 18, 2015 at 2:52

2 Answers 2

4

An easy and versatile method would be to use a spreadsheet. LibreOffice is free. Write your list, one entry per cell, and in another cell you can enter:

=RANDBETWEEN(1,10)

Where 1 is the line your list starts at, and 10 is the line it ends at. If you want it to display the randomly selected option in a cell instead of a number, change it to:

=INDIRECT("A"&RANDBETWEEN(1,10))

Where "A" is the column containing the list. You can use F9 to recalculate and get a new selection.

0

Here is how you would do it in PHP from a similar site : https://gooddecisionmaker.com

You could run this in WAMP, so on a local server environment.

$result = rand (1,10);

For the maximum and a minimum, you could do something like this:

if (empty($_POST['question'])) {
$problem = "1";
goto ask;
}
if (empty($_POST['answer1'])) {
$problem = "2";
$question = $_POST['question'];
goto ask;
}

$highest = "2";

if (!empty($_POST['answer3'])) { $highest = "3"; }
if (!empty($_POST['answer4'])) { $highest = "4"; }
if (!empty($_POST['answer5'])) { $highest = "5"; }
if (!empty($_POST['answer6'])) { $highest = "6"; }
if (!empty($_POST['answer7'])) { $highest = "7"; }
if (!empty($_POST['answer8'])) { $highest = "8"; }
if (!empty($_POST['answer9'])) { $highest = "9"; }
if (!empty($_POST['answer10'])) { $highest = "10"; }

$result = rand (1,$highest);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.