myfayt
04-21-2012, 01:58 AM
I have a standard textbox with a default value of 0.00 the customer needs to enter a value that is in the same format.
I am guessing preg_match would be the right code to use? I need to allow up to 7 digits and only two ending digits. So basically 0.01 to 9999999.99
But need to block if it's like 50000 or 500,00 etc. I could make two different textboxes, but I want them to be the same field in the database if possible.
Thanks!
<b>Price:</b></td><td><input type="text" name="price" size="6" maxlength="9" value="0.00">
I am guessing preg_match would be the right code to use? I need to allow up to 7 digits and only two ending digits. So basically 0.01 to 9999999.99
But need to block if it's like 50000 or 500,00 etc. I could make two different textboxes, but I want them to be the same field in the database if possible.
Thanks!
<b>Price:</b></td><td><input type="text" name="price" size="6" maxlength="9" value="0.00">