I’m new to both Laravel and php. Need some help with generating random numbers.
If checkbox 1 (exercise_choice_10) is selected a random number between 1-10 shall be generated.
If checkbox 2 (exercise_choice_20) is selected a random number between 11-20 shall be generated.
If checkbox 3 (exercise_choice_30) is selected a random number between 21-30 shall be generated.
<input type="checkbox" name="exercise_choice_10" value="10" {{ app('request')->input('exercise_choice_10') ? 'checked' : '' }}> Type 1</input></BR>
<input type="checkbox" name="exercise_choice_20" value="20" {{ app('request')->input('exercise_choice_20') ? 'checked' : '' }}> Type 2</input></BR>
<input type="checkbox" name="exercise_choice_30" value="30" {{ app('request')->input('exercise_choice_30') ? 'checked' : '' }}> Type 3</input></BR>
<form action="{{ route('exam.robot', ['course' => $course]) }}" method="post">
<input type="checkbox" name="exercise_choice_10" value="10" {{ app('request')->input('exercise_choice_10') ? 'checked' : '' }}> Type 1</input></BR>
<input type="checkbox" name="exercise_choice_20" value="20" {{ app('request')->input('exercise_choice_20') ? 'checked' : '' }}> Type 2</input></BR>
<input type="checkbox" name="exercise_choice_30" value="30" {{ app('request')->input('exercise_choice_30') ? 'checked' : '' }}> Type 3</input></BR>
</BR>
<button class="button">Submit</button>
</BR>
</BR>