ubuntu ubuntu - 3 months ago 52
HTML Question

disable if input value is text and enable if it number

I want :
if the value of input is text, then disable.
if the value of the same input is number ,then enable.

the code is

<input type="text" value ="<?php echo $row [0];? disable>

<input type="text" value ="<?php echo $row[0]; ?>" <?php if(is_numeric($row[0])) echo 'disabled="disabled"'; ?>>