If you fill in the amount, add two digits to the end of the number. in the next text box, enter the amount. the program automatically adds two decimal places to the end of the amount without repeating them within one day. ------ solution ------------------ automatically adding two decimal places can be implemented using js. What is your requirement for not repeating in a day? ------ Solution -------------------- 00-99: there are only one hundred customers. please fill in the amount and add two digits after the ending number.
Enter the amount in the next text box. then the program automatically adds two decimal places to the end of the amount without repeating them within one day.
------ Solution --------------------
Automatically adding two decimal places can be implemented using js. What is your need to not repeat each day?
------ Solution --------------------
00-99
Only one hundred numbers...
If your number exceeds 100, there will be duplicates.
You can find the largest one before adding, and then + 1
------ Solution --------------------
Add two decimal places and do not repeat them in a day.
------ Solution --------------------
PHP code
$ Textbox_amount = $ _ POST ['textbox ']; // two digits are displayed immediately. $ rand_num = rand (); // you can specify the daily range, it is troublesome to keep the double-digit numbers in one day. the general idea is to store the values entered by the previous customers in the database, and then compare the amount entered with the database, same, and then again. // The final result is $ textbox_amount = $ textbox_amount. ".". $ rand_num;