I want to be able to use the same random number in two PHP files, but I see a different number.
I would like both of them to be the same number when I did echo, but I don't know how to do it, so could someone tell me?
Thank you for your cooperation.
Every time I access file1.php, file2.php, a new random number occurs, so
To use the same value for multiple PHP files, you basically use session variables.
file1.php, in file2.php
As the questioner commented himself, I think we need to save the numbers somewhere and take them out.
© 2022 OneMinuteCode. All rights reserved.