'In the code igniter 3, how is the unique code applied in online nominal payments?
I'm a beginner in programming. please allow me to ask. So I'm making a top up form with Codeigniter 3. I want to give a unique code for each nominal top up. For example, a member will top up 100,000, then what must be transferred is 100,123 (example). how to generate 3 numbers behind it?
Thanks for reading and willing to help
Solution 1:[1]
please let me help to answer the question. I think, you just add another php function, for random numbers as needed.
My Example code like this:
<?php
// get top up value from form
$value_top_up = 100000;
// add random number
$value_top_up += rand(100,999);
// example result = 100729
echo $value_top_up;
?>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Ipal |