Not sure why form input type range is handled any different than a text field... but I get Undefined index on all my range selectors!
JavaScript:
function outputUpdate(obj) {
obj.previousElementSibling.value = obj.value;
}
in php:
$entrynum = $_POST['entrynum'];
$class = $_POST['class'];
$paint = $_POST['paint'];
$wheels = $_POST['wheels'];
$mods = $_POST['mods'];
$engine = $_POST['engine'];
in form:
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<label for="entrynum">Registration</label>
<input type="number" name="entrynum" id="entrynum" value="" required="true" placeholder="" />
<label for="class">Classification</label>
<input type="text" name="class" id="class" value="" required="true" placeholder="" />
<fieldset>
<legend><h3>Paint / Body</h3></legend>
<output for="paint" id="paint">0</output>
<input id="paint" type="range" min="0" max="10" value="0" step="1" list="0-10" oninput="outputUpdate(this)">
</fieldset>
...repeated for all sliders...
</form>
- Notice: Undefined index: paint
- Notice: Undefined index: wheels
- Notice: Undefined index: mods
- Notice: Undefined index: engine
...you get the point...
entrynum and class work just fine!