How can I set dynamic values for function onKeyUp? Right now I'm hardcoding the number but I need to retrieve it from a php variable.
php value
$num = $queryResults['col_number'];
html
<input onKeyUp="if(this.value>'$num'){this.value='$num';}
else if(this.value<0){this.value='0';}" />
You need to output the value using
<?php echo $num ?>
or shorter<?= $num ?>