[HTML & PHP] Text field values
I am making a page, that you can order credits off of a webshop.
i have a custom number of credits input field.
when you submit it, the next page tells you what you submitted and then how much it costs (submittion / 20)
i need my custom field to not allow values less than 50 to be submitted, and that the number has to end in zeros. if the value could only be numbers it would be great too.
kinda confusing O_O, i hope i explained myself properly. here is a link for a visual: [url=http://mu.tribalonline.net/index.php?op=getcredits]Tribal MU
Re: [HTML & PHP] Text field values
Re: [HTML & PHP] Text field values
This has nothing to with:
but: SPECIAL* 20000 credits $900 (save $100)
Lol ?
Re: [HTML & PHP] Text field values
its a test :P
i'm just messing around, im a noob at php ^^
(about the math thing, lol. the other url helped. thanks ^^)
btw, how do i get the divider by 20 to use 2 decimal places instead of no decimal places? any way?
Re: [HTML & PHP] Text field values
sprintf("%01.2f", $result);
See also the manual on sprintf :smile:
Re: [HTML & PHP] Text field values
thanks :D
solved. (can close now)